diff options
author | Guy Harris <gharris@sonic.net> | 2022-01-01 22:56:18 -0800 |
---|---|---|
committer | Guy Harris <gharris@sonic.net> | 2022-01-01 22:56:18 -0800 |
commit | ea1928b35bddea69b8843161f2f8dbff54c0d74e (patch) | |
tree | 368dfc687bfe0f043c01bceab34016daab112955 /pcap.c | |
parent | 95c0e2648512ac6378df3b2e3888ca9433ab352f (diff) |
Have a separate DIAG_OFF_ for pointer-to-integer narrowing.
Use that for pcap_fileno() on Windows; that API shouldn't exist on
Windows, and should never be used, but WinPcap offered it, so we're
stuck with it. At least try to prevent compilation errors when libpcap
is built.
This should fix the warnings for pcap_fileno() in GitHub issue #1026.
Diffstat (limited to 'pcap.c')
-rw-r--r-- | pcap.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -3484,9 +3484,9 @@ pcap_fileno(pcap_t *p) * routine (and be prepared for it to return * INVALID_HANDLE_VALUE). */ -DIAG_OFF_NARROWING +DIAG_OFF_PTR_TO_INT return ((int)(DWORD)p->handle); -DIAG_ON_NARROWING +DIAG_ON_PTR_TO_INT } else return (PCAP_ERROR); } |