wireshark-dev October 2010 archive
Main Archive Page > Month Archives  > wireshark-dev archives
wireshark-dev: [Wireshark-dev] passing argument 4 of 'pcap_compi

[Wireshark-dev] passing argument 4 of 'pcap_compile_nopcap' discards qualifiers from pointer target typ

From: Sake Blok <sake_at_nospam>
Date: Sun Oct 03 2010 - 12:16:19 GMT
To: Developer support list for Wireshark <wireshark-dev@wireshark.org>

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