From: Guy Harris Date: Thu, 18 Apr 2019 07:20:24 +0000 (-0700) Subject: Squelch C4324 warnings. X-Git-Tag: tcpdump-4.99-bp~825 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/7c30120f52c22c1dd971431383ad2df8ca1a12c4 Squelch C4324 warnings. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 32564309..6dddef6a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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