]> Savannah Git Hosting - gnulib.git/commitdiff
quotearg-tests: pacify gcc -Wall
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 20 Oct 2016 22:35:02 +0000 (15:35 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 20 Oct 2016 22:35:31 +0000 (15:35 -0700)
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
tests/test-quotearg-simple.c
tests/test-quotearg.h

index f274695df6310780f613166df4bbdfcb0af93466..03d290f791b601c76c000e678a64c5cf40c6cae7 100644 (file)
--- 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
index 9c71d03b5424b1c3e5e0e6e832b60a5786446d91..99b69f4aff3df865deeb7283cce713012a75ec80 100644 (file)
@@ -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[])
 {
index 1de74368d2825f484a53748a4166f6b32cd463c8..6e8510e5b4368eae46e6bd6a9a0b0c6b7dba3f39 100644 (file)
@@ -118,15 +118,6 @@ use_quotearg (const char *str, size_t *len)
   return p;
 }
 
-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)
 {