]> The Tcpdump Group git mirrors - tcpdump/commit
Suppress "casting away const" warnings in missing/getopt_long.c.
authorGuy Harris <[email protected]>
Sat, 24 Jul 2021 08:51:02 +0000 (01:51 -0700)
committerDenis Ovsienko <[email protected]>
Wed, 29 Sep 2021 14:08:03 +0000 (15:08 +0100)
commit72fee3fe25c276b1c0bd1dad7b3db8bf0f48dfec
tree936e60544a8a2cbb217869e71a0e300df4a72eb4
parenteeb7aeb547047aed6882aa39f6497914e42779f3
Suppress "casting away const" warnings in missing/getopt_long.c.

It's explicitly cheating in some places; just cast away the warnings.

Add a Clang version testing macro to compiler-tests.h.

Move the diagnostic control #defines from netdissect-stdinc.h to
diag-control.h, libpcap-style, so that they can be used by code that
doesn't use (or need) netdissect-stdinc.h.  This also means that we can
limit the inclusion of diag-control.h, and the definition of those

Do them more libpcap-style, with separate DIAG_OFF/DIAG_ON pairs for
particular issues, rather than having DIAG_OFF() and DIAG_ON() macros
that take -W option names as arguments; that way, if we need to define
them for compilers that don't have the GCC/Clang syntax for those
pragmas, e.g. MSVC, we can do so.

(cherry picked from commit 39f09d68ce7ebe9e229c9bf5209bfc30a8f51064)
Makefile.in
compiler-tests.h
diag-control.h [new file with mode: 0644]
missing/getopt_long.c
netdissect-stdinc.h
print-esp.c
print-rx.c
print-tcp.c
signature.c
tcpdump.c