summaryrefslogtreecommitdiff
path: root/lib/vasnprintf.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2021-08-01 17:51:11 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2021-08-01 18:06:59 -0700
commit6b3915fdec301bfee669ffee6491a7a7bdf6c0dc (patch)
tree115bcc4c29cf3ade9e2909d84022d6606b312f03 /lib/vasnprintf.c
parent3efc9c5e4f48b9abcfe6c73e7bb7233173e4ee75 (diff)
downloadgnulib-6b3915fdec301bfee669ffee6491a7a7bdf6c0dc.tar.gz
vasnprintf: improve -fanalyzer malloc checking
Diffstat (limited to 'lib/vasnprintf.c')
-rw-r--r--lib/vasnprintf.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/vasnprintf.c b/lib/vasnprintf.c
index 12c532ef46..d9b669d150 100644
--- a/lib/vasnprintf.c
+++ b/lib/vasnprintf.c
@@ -60,6 +60,14 @@
#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. */