ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Ethereal-dev: [Ethereal-dev] Re: [Ethereal-cvs] rev 13626: /trunk/gtk/: packet_win.c

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Joerg Mayer <jmayer@xxxxxxxxx>
Date: Sun, 6 Mar 2005 11:34:37 +0100
On Sun, Mar 06, 2005 at 10:03:00AM +0000, jmayer@xxxxxxxxxxxx wrote:
>  Warning fix:
>  ../capture.h:115: warning: struct pcap_stat declared inside parameter list
>  ../capture.h:115: warning: its scope is only this definition or declaration,
>          which is probably not what you want
>  ../capture.h:125: warning: struct pcap_stat declared inside parameter list
> 
> Directory: /trunk/gtk/
>   Changes    Path            Action
>   +2 -0      packet_win.c    Modified

I just reverted this patch, as the proper fix for the warning was to include
pcap.h. This warning not only occurs in gtk/packet_win.c but also in
gtk/summary_dlg.c gtk/mtp3_summary.c gtk/gsm_map_summary.c and summary.c
Including pcap.h into all of them will just cause compilation to fail on
systems without libpcap. Looking at things a bit further it seems that
capture.h doesn't contain anything if libpcap isn't present. So the proper
fix may be to remove the ifdef HAVE_LIBPCAP from capture.h and change each
include capture.h to
ifdef HAVE_LIBPCAP
 include pcap.h
 include capture.h
endif
in the calling files. Doesn anyone have a better idea?

 Ciao
       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.