On 10/16/2016 08:06 AM, Bruno Haible wrote:
test-quotearg.h:123:1: warning: 'use_quote_double_quotes' defined but not used 
[-Wunused-function]

Do you see a simple and reliable way to correct or silence these warnings?

For test-quotearg.h the attached patch (installed) should do the trick. I'll leave rijndael-api-fst.c for Simon.

From 32f2ef7d5cdc0c1a509fa2100ef80f5ff14eb802 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Thu, 20 Oct 2016 15:35:02 -0700
Subject: [PATCH] quotearg-tests: pacify gcc -Wall

Problem reported by Bruno Haible in:
http://lists.gnu.org/archive/html/bug-gnulib/2016-10/msg00066.html
* tests/test-quotearg-simple.c (use_quote_double_quotes): Move here ...
* tests/test-quotearg.h: ... from here.
---
 ChangeLog                    | 8 ++++++++
 tests/test-quotearg-simple.c | 9 +++++++++
 tests/test-quotearg.h        | 9 ---------
 3 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f274695..03d290f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2016-10-20  Paul Eggert  <eggert@cs.ucla.edu>
+
+	quotearg-tests: pacify gcc -Wall
+	Problem reported by Bruno Haible in:
+	http://lists.gnu.org/archive/html/bug-gnulib/2016-10/msg00066.html
+	* tests/test-quotearg-simple.c (use_quote_double_quotes): Move here ...
+	* tests/test-quotearg.h: ... from here.
+
 2016-10-20  Pádraig Brady  <P@draigBrady.com>
 
 	canonicalize-lgpl: fix for missing SIZE_MAX on older systems
diff --git a/tests/test-quotearg-simple.c b/tests/test-quotearg-simple.c
index 9c71d03..99b69f4 100644
--- a/tests/test-quotearg-simple.c
+++ b/tests/test-quotearg-simple.c
@@ -245,6 +245,15 @@ static struct result_groups custom_results[] = {
       "\"'a' b'\"", "\"'" LQ_ENC RQ_ENC "'\"", "\"'" LQ RQ "'\"" } }
 };
 
+static char *
+use_quote_double_quotes (const char *str, size_t *len)
+{
+  char *p = *len == SIZE_MAX ? quotearg_char (str, '"')
+                               : quotearg_char_mem (str, *len, '"');
+  *len = strlen (p);
+  return p;
+}
+
 int
 main (int argc _GL_UNUSED, char *argv[])
 {
diff --git a/tests/test-quotearg.h b/tests/test-quotearg.h
index 1de7436..6e8510e 100644
--- a/tests/test-quotearg.h
+++ b/tests/test-quotearg.h
@@ -119,15 +119,6 @@ use_quotearg (const char *str, size_t *len)
 }
 
 static char *
-use_quote_double_quotes (const char *str, size_t *len)
-{
-  char *p = *len == SIZE_MAX ? quotearg_char (str, '"')
-                               : quotearg_char_mem (str, *len, '"');
-  *len = strlen (p);
-  return p;
-}
-
-static char *
 use_quotearg_colon (const char *str, size_t *len)
 {
   char *p = (*len == SIZE_MAX ? quotearg_colon (str)
-- 
2.7.4

Reply via email to