]> Savannah Git Hosting - gnulib.git/commitdiff
argmatch-tests: improve -fanalyzer malloc checking
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 2 Aug 2021 00:52:29 +0000 (17:52 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 2 Aug 2021 01:06:59 +0000 (18:06 -0700)
ChangeLog
tests/test-argmatch.c

index d67787f4216c16195a8eab36b47c5218a7435f01..577d3077e9c0afdfa76a4362c5927f805c6e876f 100644 (file)
--- 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  <meyering@fb.com>
index a7ea67cef44f7bda3843d9c76f75605316201220..ef105360b92c8aa478b263f568d400817e5eb544 100644 (file)
 
 #include <config.h>
 
+/* 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 <stdlib.h>