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  <br...@clisp.org>

        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