Re: [tcpdump-workers] if anyone wanted to practice fixing compiler warnings in tcpdump...

2018-07-29 Thread Guy Harris
On Jul 29, 2018, at 5:48 AM, Denis Ovsienko wrote: > ./util-print.c: In function ‘ts_format.isra.0’: > ./util-print.c:265:27: warning: ‘%06u’ directive output may be truncated > writing between 6 and 10 bytes into a region of size between 5 and 12 > [-Wformat-truncation=] > format = "%02d:%02d:

Re: [tcpdump-workers] if anyone wanted to practice fixing compiler warnings in tcpdump...

2018-07-29 Thread Guy Harris
On Jul 29, 2018, at 5:48 AM, Denis Ovsienko wrote: > Building (configure+gcc) tcpdump master branch with libpcap 0.6.1 yields the > following compiler warnings, some of which are as easy as decorating a > variable declaration with #ifdef: > > ./tcpdump.c: In function ‘open_interface’: > ./tcpd

Re: [tcpdump-workers] Tcpdump doesn't check for pcap_set_tstamp_type warnings

2018-07-29 Thread Guy Harris
On Jul 29, 2018, at 8:57 AM, Greg Steinbrecher wrote: > When tcpdump calls pcap_set_tstamp_type, it only checks if the returned > status is less than 0; if the specific type requested exists but isn't > supported (e.g. `-j adapter` on a card that only supports adapter_unsynced) > pcap_set_tsta

[tcpdump-workers] Tcpdump doesn't check for pcap_set_tstamp_type warnings

2018-07-29 Thread Greg Steinbrecher
Hi all, When tcpdump calls pcap_set_tstamp_type, it only checks if the returned status is less than 0; if the specific type requested exists but isn't supported (e.g. `-j adapter` on a card that only supports adapter_unsynced) pcap_set_tstamp_type returns the warning code PCAP_WARNING_TSTAMP_T

[tcpdump-workers] if anyone wanted to practice fixing compiler warnings in tcpdump...

2018-07-29 Thread Denis Ovsienko
Building (configure+gcc) tcpdump master branch with libpcap 0.6.1 yields the following compiler warnings, some of which are as easy as decorating a variable declaration with #ifdef: ./tcpdump.c: In function ‘open_interface’: ./tcpdump.c:1382:22: warning: passing argument 1 of ‘pcap_open_live’ di