summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2021-08-01 17:52:29 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2021-08-01 18:06:59 -0700
commitcfa469f4a2ac29a2bb1efcdca823b02008c1e1f0 (patch)
tree66ecbc526f79f78b789d41ca44c6179c54b9998d /tests
parent6b3915fdec301bfee669ffee6491a7a7bdf6c0dc (diff)
downloadgnulib-cfa469f4a2ac29a2bb1efcdca823b02008c1e1f0.tar.gz
argmatch-tests: improve -fanalyzer malloc checking
Diffstat (limited to 'tests')
-rw-r--r--tests/test-argmatch.c7
1 files changed, 7 insertions, 0 deletions
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 <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>