From 5ed5745664f788c7c9d2a2cc9dac40bb815f6368 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Wed, 15 Jun 2011 21:22:30 +0000 Subject: [PATCH] Sigh. Cast away a warning. svn path=/trunk/; revision=37676 --- dumpcap.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dumpcap.c b/dumpcap.c index 4cc46366ca..f6faf9885a 100644 --- 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; }