bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

quotearg tests: avoid warnings


From: Bruno Haible
Subject: quotearg tests: avoid warnings
Date: Sat, 22 Apr 2017 15:00:32 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-72-generic; KDE/5.18.0; x86_64; ; )

On Mac OS X, I'm seeing these warnings:

In file included from test-quotearg.c:32:
./test-quotearg.h:59:1: warning: unused function 'compare_strings' 
[-Wunused-function]
compare_strings (char *(func) (char const *, size_t *),
^
./test-quotearg.h:102:1: warning: unused function 'use_quotearg_buffer' 
[-Wunused-function]
use_quotearg_buffer (const char *str, size_t *len)
^
./test-quotearg.h:114:1: warning: unused function 'use_quotearg' 
[-Wunused-function]
use_quotearg (const char *str, size_t *len)
^
./test-quotearg.h:122:1: warning: unused function 'use_quotearg_colon' 
[-Wunused-function]
use_quotearg_colon (const char *str, size_t *len)
^


This fixes it:


2017-04-22  Bruno Haible  <address@hidden>

        quotearg tests: Avoid warnings.
        * tests/test-quotearg.c: Don't include test-quotearg.h if ENABLE_NLS is
        false.

diff --git a/tests/test-quotearg.c b/tests/test-quotearg.c
index e63e8b0..9308f03 100644
--- a/tests/test-quotearg.c
+++ b/tests/test-quotearg.c
@@ -29,10 +29,10 @@
 #include "gettext.h"
 #include "macros.h"
 
-#include "test-quotearg.h"
-
 #if ENABLE_NLS
 
+# include "test-quotearg.h"
+
 static struct result_groups locale_results[] = {
   /* locale_quoting_style */
   { { LQ RQ, LQ "\\0001\\0" RQ, 11, LQ "simple" RQ,




reply via email to

[Prev in Thread] Current Thread [Next in Thread]