Wireshark-bugs: [Wireshark-bugs] [Bug 2961] New: svn capture-pcap-util.c compilation error

Date: Mon, 13 Oct 2008 08:22:23 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2961

           Summary: svn capture-pcap-util.c compilation error
           Product: Wireshark
           Version: SVN
          Platform: PC
        OS/Version: Debian
            Status: NEW
          Severity: Trivial
          Priority: Low
         Component: Wireshark
        AssignedTo: wireshark-bugs@xxxxxxxxxxxxx
        ReportedBy: storm.richard@xxxxxxxxx


Build Information:
wireshark-1.1.2-SVN-26426
debian i686
--
gcc -DHAVE_CONFIG_H -I.  -I. -I./wiretap    -I/usr/local/include
'-DPLUGIN_DIR="/usr/local/lib/wireshark/plugins/1.1.2-SVN-26426"' -Werror
-DINET6 -D_U_="__attribute__((unused))" -g -O2 -Wall -W
-Wdeclaration-after-statement -Wendif-labels -Wpointer-arith -Wno-pointer-sign
-Wcast-align -I/usr/local/include -pthread -I/usr/include/gtk-2.0
-I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo
-I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
-I/usr/include/freetype2 -I/usr/include/libpng12   -MT
wireshark-capture-pcap-util.o -MD -MP -MF .deps/wireshark-capture-pcap-util.Tpo
-c -o wireshark-capture-pcap-util.o `test -f 'capture-pcap-util.c' || echo
'./'`capture-pcap-util.c
cc1: warnings being treated as errors
capture-pcap-util.c: In function ‘get_pcap_linktype_list’:
capture-pcap-util.c:384: warning: passing argument 1 of ‘pcap_open_live’
discards qualifiers from pointer target type
make[2]: *** [wireshark-capture-pcap-util.o] Error 1
make[2]: Leaving directory `/tmp/w/wireshark-1.1.2-SVN-26426'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/w/wireshark-1.1.2-SVN-26426'
make: *** [all] Error 2



One way to fix that:
--- capture-pcap-util.c 2008-10-13 12:50:15.000000000 +0300
+++ /tmp/capture-pcap-util.c    2008-10-13 17:57:07.000000000 +0300
@@ -381,7 +381,7 @@
 #ifdef HAVE_PCAP_OPEN
        pch = pcap_open(devname, MIN_PACKET_SIZE, 0, 0, NULL, errbuf);
 #else
-       pch = pcap_open_live(devname, MIN_PACKET_SIZE, 0, 0, errbuf);
+       pch = pcap_open_live((char *)devname, MIN_PACKET_SIZE, 0, 0, errbuf);
 #endif
        if (pch == NULL) {
                if (err_str != NULL)


-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.