]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Squelch C4324 warnings.
authorGuy Harris <[email protected]>
Thu, 18 Apr 2019 07:20:24 +0000 (00:20 -0700)
committerGuy Harris <[email protected]>
Thu, 18 Apr 2019 07:20:24 +0000 (00:20 -0700)
CMakeLists.txt

index 32564309eb7168e5ac21a5bdf39bfe46972193ab..6dddef6a5ef1864732a16beb51ac83081669cf85 100644 (file)
@@ -873,6 +873,18 @@ if(EXISTS ${CMAKE_SOURCE_DIR}/.devel OR EXISTS ${CMAKE_BINARY_DIR}/.devel)
         # XXX - add /Qspectre if that is really worth doing.
         #
         check_and_add_compiler_option(-wd5045)
+        #
+        # We do *not* care whether a structure had padding added at
+        # the end because of __declspec(align) - *we* don't use
+        # __declspec(align), because the only structures whose layout
+        # we precisely specify are those that get overlayed on packet
+        # data, and in those every element is an array of octets so
+        # that we have full control over the size and aligmnet, and,
+        # apparently, jmp_buf has such a declaration on x86, meaning
+        # that everything that includes netdissect.h, i.e. almost every
+        # file in tcpdump, gets a warning.
+        #
+        check_and_add_compiler_option(-wd4324)
     else()
         #
         # Other compilers, including MSVC with a Clang front end and