Wireshark-dev: [Wireshark-dev] passing argument 4 of 'pcap_compile_nopcap' discards qualifiers
From: Sake Blok <sake@xxxxxxxxxx>
Date: Sun, 3 Oct 2010 14:16:19 +0200
Hi,

The OSX-PPC buildbot is complaining:

capture_dlg.c:266: warning: passing argument 4 of 'pcap_compile_nopcap' discards qualifiers from pointer target type

Indeed the pointer given to pcap_compile_nopcap is declared as a "const gchar *" and the 4th argument of pcap_compile_nopcap is declared as a "char *".

How can this be fixed?

Do I have to copy the string first before giving it to pcap_compile_nopcap? Or can I just use a "(char *)" cast? That however would still defeat the purpose of the "const" declaration in the first place would it not?

Cheers,


Sake