Sigh. Cast away a warning.
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 15 Jun 2011 21:22:30 +0000 (21:22 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 15 Jun 2011 21:22:30 +0000 (21:22 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37676 f5534014-38df-0310-8fa8-9805f1628bb7

dumpcap.c

index 4cc46366cae081809af283c6bd65171b1644a7fb..f6faf9885afa1215438a3ee1d0e3e2fa81d5ff55 100644 (file)
--- a/dumpcap.c
+++ b/dumpcap.c
@@ -733,7 +733,13 @@ compile_capture_filter(const char *iface, pcap_t *pcap_h,
           "Warning:  Couldn't obtain netmask info (%s).", lookup_net_err_str);*/
         netmask = 0;
     }
-    if (pcap_compile(pcap_h, fcode, cfilter, 1, netmask) < 0)
+
+    /*
+     * Sigh.  Older versions of libpcap don't properly declare the
+     * third argument to pcap_compile() as a const pointer.  Cast
+     * away the warning.
+     */
+    if (pcap_compile(pcap_h, fcode, (char *)cfilter, 1, netmask) < 0)
         return FALSE;
     return TRUE;
 }