Wireshark-dev: Re: [Wireshark-dev] Still compile problems with capture_dlg.c
From: Michael Tuexen <Michael.Tuexen@xxxxxxxxxxxxxxxxx>
Date: Sat, 6 Aug 2011 14:42:00 +0200
On Aug 6, 2011, at 12:27 PM, Joerg Mayer wrote:

> There are two problems:
> 1) Some functions are defined but not used in my configuration.
> 2) The else without previous if error. If I #undefine HAVE_PCAP_CREATE, the
>   compile succeeds. Maybe a compiler bug?
> Note: On my Linux system both HAVE_PCAP_CREATE and HAVE_PCAP_REMOTE are defined.
No, not a bug in the compiler, a bug in the code. I checked in a fix in
http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=38375
> 
> cd /home/jmayer/work/wireshark/svn/build/gtk && /usr/bin/gcc  -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -DGTK_DISABLE_SINGLE_INCLUDES -DMAIN_MENU_USE_UIMANAGER=1 -DGTK_DISABLE_DEPRECATED -DGSEAL_ENABLE -DWANT_PACKET_EDITOR=1 -I/home/jmayer/work/wireshark/svn/build -I/home/jmayer/work/wireshark/svn/trunk -I/home/jmayer/work/wireshark/svn/trunk/epan -I/home/jmayer/work/wireshark/svn/trunk/tools/lemon -I/home/jmayer/work/wireshark/svn/trunk/wiretap -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gtk-2.0 -I/usr/include/freetype2 -I/usr/include/gdk-pixbuf-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/home/jmayer/work/wireshark/svn/trunk/gtk   -O2 -Wall -W -Wextra -Wdeclaration-after-statement -Wendif-labels -Wpointer-arith -Wno-pointer-sign -Warray-bounds -Wcast-align -Wformat-security -Wold-style-definition -fexcess-precision=fast -Werror -o CMakeFiles/ui.dir/capture_dlg.c.o   -c /home/jmayer/work/wireshark/svn/trunk/gtk/capture_dlg.c
> /home/jmayer/work/wireshark/svn/trunk/gtk/capture_dlg.c: In function ‘insert_new_rows’:
> /home/jmayer/work/wireshark/svn/trunk/gtk/capture_dlg.c:795:9: error: ‘else’ without a previous ‘if’
> cc1: warnings being treated as errors
> /home/jmayer/work/wireshark/svn/trunk/gtk/capture_dlg.c: At top level:
> /home/jmayer/work/wireshark/svn/trunk/gtk/capture_dlg.c:527:1: error: ‘iftype_combo_box_add’ defined but not used
> /home/jmayer/work/wireshark/svn/trunk/gtk/capture_dlg.c:600:1: error: ‘iftype_combo_box_new’ defined but not used
> /home/jmayer/work/wireshark/svn/trunk/gtk/capture_dlg.c:629:1: error: ‘iftype_combo_is_separator’ defined but not used
> make[2]: *** [gtk/CMakeFiles/ui.dir/capture_dlg.c.o] Error 1
I checked in a fix for these warnings in
http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=38376

Please let me know if it now compiled on your configuration.

Best regards
Michael
> 
> Thanks
>    Joerg
> -- 
> Joerg Mayer                                           <jmayer@xxxxxxxxx>
> We are stuck with technology when what we really want is just stuff that
> works. Some say that should read Microsoft instead of technology.
> ___________________________________________________________________________
> Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
> Archives:    http://www.wireshark.org/lists/wireshark-dev
> Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
>             mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe