diff options
author | Denis Ovsienko <denis@ovsienko.info> | 2021-08-01 23:16:46 +0100 |
---|---|---|
committer | Denis Ovsienko <denis@ovsienko.info> | 2021-08-01 23:21:31 +0100 |
commit | 57c96726059fa3f05bc1cbeeb2de37497c9ec9ed (patch) | |
tree | ee3e46f6a767e304cde1028f482d434f6d40f4bf /pcap-config.in | |
parent | e3ee78cb708a8b4119258208459276506bfb9758 (diff) |
Squelch a warning in pcap_open_offline_with_tstamp_precision().
Clang 10.0.1 on NetBSD 9.2 and OpenBSD 6.9:
./savefile.c:354:4: warning: code will never be executed
[-Wunreachable-code]
In Linux, for example, stdin is a pointer to FILE, so it can be NULL or
non-NULL. In NetBSD and OpenBSD it is a macro:
#define stdin (&__sF[0])
By definition, address of a variable is never NULL hence the warning.
However, assigning the address to a pointer and then immediately
comparing the pointer with NULL is not a condition that is always false,
as far as Clang sees it. Apply the workaround and remove two exemption
rules from build.sh.
Diffstat (limited to 'pcap-config.in')
0 files changed, 0 insertions, 0 deletions