]> The Tcpdump Group git mirrors - tcpdump/blobdiff - tcpdump.c
Have a #define to squelch -Wunused-result warnings.
[tcpdump] / tcpdump.c
index a7756be5624c0322d403c7b56403da6601509dc6..9ec0aaf19916a620f8c7195652077e006fa12dfb 100644 (file)
--- a/tcpdump.c
+++ b/tcpdump.c
@@ -2326,8 +2326,11 @@ main(int argc, char **argv)
                         * on; this may be a non-Linux "any" device
                         * that doesn't support DLT_LINUX_SLL2.
                         */
-                       if (strcmp(device, "any") == 0)
+                       if (strcmp(device, "any") == 0) {
+DIAG_OFF_WARN_UNUSED_RESULT
                                (void) pcap_set_datalink(pd, DLT_LINUX_SLL2);
+DIAG_ON_WARN_UNUSED_RESULT
+                       }
                }
 #endif
                i = pcap_snapshot(pd);