From: Ivailo Date: Tue, 3 Dec 2013 14:20:22 +0000 (+0000) Subject: test-xvasprintf: disable some -Wformat-security diagnostics X-Git-Tag: snapshot-start~22 X-Git-Url: http://erislabs.net/gitweb/?p=gnulib.git;a=commitdiff_plain;h=4e42bcc4f190909d49d38f1137726b3bc36b7191 test-xvasprintf: disable some -Wformat-security diagnostics * tests/test-xvasprintf.c: Disable -Wformat-zero-length and -Wformat-nonliteral checks, as these edge cases are part of the test. --- diff --git a/ChangeLog b/ChangeLog index 4e7893f9d..338990581 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2013-12-03 Ivailo + + test-xvasprintf: (trivial) fix to disable some -Wformat-security diags + * tests/test-xvasprintf.c: Disable -Wformat-zero-length and + -Wformat-nonliteral checks, as these edge cases are part of the test. + 2013-12-03 Eric Blake regex: avoid glibc deadlock during configure diff --git a/tests/test-xvasprintf.c b/tests/test-xvasprintf.c index 453ca58e9..098722554 100644 --- a/tests/test-xvasprintf.c +++ b/tests/test-xvasprintf.c @@ -16,6 +16,13 @@ /* Written by Bruno Haible , 2007. */ +/* Tell GCC not to warn about the specific edge cases tested here. */ +#if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__ +# pragma GCC diagnostic ignored "-Wformat-zero-length" +# pragma GCC diagnostic ignored "-Wformat-nonliteral" +# pragma GCC diagnostic ignored "-Wformat-security" +#endif + #include #include "xvasprintf.h"