]> The Tcpdump Group git mirrors - tcpdump/commit
Have a #define to squelch -Wunused-result warnings.
authorGuy Harris <[email protected]>
Fri, 1 Dec 2023 09:05:18 +0000 (01:05 -0800)
committerGuy Harris <[email protected]>
Fri, 1 Dec 2023 23:21:31 +0000 (15:21 -0800)
commitdd821c4f84a9d4956fc39a3a2359cf4ee4652e72
tree19a5acebbad1f04cdf8de41414c74fdd15e7b1d8
parent6193b88600f3d4bc506f3b36015279476ef03f02
Have a #define to squelch -Wunused-result warnings.

In one place, we really *do* legitimately ignore the return value of
pcap_set_datalink(). We cast its return value to void, which appears to
squelch warnings from Clang, but not from at least some versions of GCC,
so provide DIAG_OFF_WARN_UNUSED_RESULT/DIAG_ON_WARN_UNUSED_RESULT and
use them to squelch the warning.
diag-control.h
tcpdump.c