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

index b1b6b4296c161fe71d96a4a51957e327cc91d516..d67787f4216c16195a8eab36b47c5218a7435f01 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,6 +15,8 @@
        * 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:
+       Disable -Wanalyzer-null-argument here.
 
 2021-08-01  Jim Meyering  <meyering@fb.com>
 
index 12c532ef4698e882d52eace7185bebcc52f16705..d9b669d1504b421aee487423ba992c831684f5a4 100644 (file)
 #ifndef VASNPRINTF
 # include <config.h>
 #endif
+
+/* 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 <alloca.h>
 
 /* Specification.  */