|author||Guy Harris <firstname.lastname@example.org>||2016-03-14 09:56:31 -0700|
|committer||Guy Harris <email@example.com>||2016-03-14 16:59:17 +0000|
Try to suppress a compiler feature that goes wrong.
-Warray-bounds + the macros for strcmp() = pain. Either the macro is doing something wrong or the compiler is confused, because if( strcmp(argv[i],"--")==0 ) dashdash = 1; should not produce array index 3 is past the end of the array (which contains 3 elements) Either 1) the macro is blithely running past the end of "--", which does, indeed, contain only 3 elements, or 2) the compiler mistakenly believes that the code generated by the macro is running past the end of "--" when it isn't. Change-Id: I4183e29272ba9e05b3b370efd90102f2226df7c3 Reviewed-on: https://code.wireshark.org/review/14469 Reviewed-by: Guy Harris <firstname.lastname@example.org>
Diffstat (limited to 'configure.ac')
1 files changed, 16 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index e9beccbb5b..75b14578d6 100644
@@ -993,6 +993,22 @@ AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wno-long-long)
+# Either the version of clang on the "clang code analysis" buildbot is
+# horribly broken, or the header files on that buildbot are horribly
+# broken, as the perfectly-legitimate statement
+# if( strcmp(argv[i],"--")==0 ) dashdash = 1;
+# is getting stoopid "array index 3 is past the end of the array (which
+# contains 3 elements)" complaints from the compiler.
+# The macro for strcmp() in glibc(?) really seems to give C compilers
+# conniptions; I think I've seen crap from GCC as well with that macro.
+# So, alas, suppress the compile-time array bounds checks.
# The following are C only, not C++