From: Paul Eggert Date: Mon, 2 Aug 2021 00:52:29 +0000 (-0700) Subject: argmatch-tests: improve -fanalyzer malloc checking X-Git-Tag: v1.0~2736 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=cfa469f4a2ac29a2bb1efcdca823b02008c1e1f0;p=gnulib.git argmatch-tests: improve -fanalyzer malloc checking --- diff --git a/ChangeLog b/ChangeLog index d67787f421..577d3077e9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -15,7 +15,7 @@ * lib/malloca.c (mmalloca): Redo to pacify GCC, to cut down on the number of casts, and to avoid signed integer overflow on theoretical platforms. - * lib/vasnprintf.c: + * lib/vasnprintf.c, tests/test-argmatch.c: Disable -Wanalyzer-null-argument here. 2021-08-01 Jim Meyering diff --git a/tests/test-argmatch.c b/tests/test-argmatch.c index a7ea67cef4..ef105360b9 100644 --- a/tests/test-argmatch.c +++ b/tests/test-argmatch.c @@ -19,6 +19,13 @@ #include +/* As of GCC 11.2.1, gcc -Wanalyzer-too-complex reports that main's + use of CHECK macros expands to code that is too complicated for gcc + -fanalyzer. Suppress the resulting bogus warnings. */ +#if 10 <= __GNUC__ +# pragma GCC diagnostic ignored "-Wanalyzer-null-argument" +#endif + #include "argmatch.h" #include