Wireshark mailing list archives

passing argument 4 of 'pcap_compile_nopcap' discards qualifiers from pointer target typ


From: Sake Blok <sake () euronet nl>
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

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe


Current thread: