On 12/02/2013 09:51 PM, Ivailo wrote: > And btw, the same failure is triggered on gettext (which I had to update > to test the latest diffutils) for the exact same reason - gnulib's xvasprintf > test. It's not just diffutils that's affected by this.
I'm about to push the attached in your name. It's tagged as trivial for copyright reasons. thanks, Pádraig.
>From 3c39eda9301859cc1c4c63e3ac38dbd5600b110b Mon Sep 17 00:00:00 2001 From: Ivailo <xakep...@gmail.com> Date: Tue, 3 Dec 2013 14:20:22 +0000 Subject: [PATCH] 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. --- ChangeLog | 6 ++++++ tests/test-xvasprintf.c | 6 ++++++ 2 files changed, 12 insertions(+), 0 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2bc45fc..822edc0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2013-12-03 Ivailo <xakep...@gmail.com> + + 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-02 Pádraig Brady <p...@draigbrady.com> md5, sha1, sha256, sha512: use openssl routines if available. diff --git a/tests/test-xvasprintf.c b/tests/test-xvasprintf.c index 453ca58..691e740 100644 --- a/tests/test-xvasprintf.c +++ b/tests/test-xvasprintf.c @@ -16,6 +16,12 @@ /* Written by Bruno Haible <br...@clisp.org>, 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" +#endif + #include <config.h> #include "xvasprintf.h" -- 1.7.7.6