Mercurial > hg > octave-kai > gnulib-hg
changeset 17470:9c2a21bcb268
xvasprintf-tests: port to GCC with hardening flags
* tests/test-xvasprintf.c (test_xasprintf): Pass another arg to
xasprintf, to pacify GCC. Reported by Santiago Vila in:
http://lists.gnu.org/archive/html/bug-diffutils/2013-08/msg00002.html
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Tue, 13 Aug 2013 13:47:29 -0700 |
parents | 3efb2780c5ae |
children | 6e09d76e533b |
files | ChangeLog tests/test-xvasprintf.c |
diffstat | 2 files changed, 11 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2013-08-13 Paul Eggert <eggert@cs.ucla.edu> + + xvasprintf-tests: port to GCC with hardening flags + * tests/test-xvasprintf.c (test_xasprintf): Pass another arg to + xasprintf, to pacify GCC. Reported by Santiago Vila in: + http://lists.gnu.org/archive/html/bug-diffutils/2013-08/msg00002.html + 2013-08-11 Paul Eggert <eggert@cs.ucla.edu> fpending: port to recent Cygwin change to stdio_ext.h
--- a/tests/test-xvasprintf.c +++ b/tests/test-xvasprintf.c @@ -93,9 +93,11 @@ } { - /* Silence gcc warning about zero-length format string. */ + /* Silence gcc warning about zero-length format string, + and about "format not a string literal and no format" + (whatever that means) . */ const char *empty = ""; - result = xasprintf (empty); + result = xasprintf (empty, empty); ASSERT (result != NULL); ASSERT (strcmp (result, "") == 0); free (result);