Ethereal-dev: [Ethereal-dev] gcc warnings about unused variables
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: Fri, 15 Feb 2002 16:34:48 +0100
Hello, some time in the midle of 2001 we turned on -W warnings in gcc, but with -Wno-unused because there were to many warnings. I've finally sat down and done a patch that allows to declare variables in headers as unused with a gcc attribute (info came from Guy). What I've done is to change configure.in in the following way: if test x$GCC != x ; then - CFLAGS="-Wall -W -Wno-unused $CFLAGS" + CFLAGS="-Wall -W $CFLAGS" AC_MSG_RESULT(yes) + CFLAGS="-D_U_=\"__attribute__((unused))\" $CFLAGS" else AC_MSG_RESULT(no) + CFLAGS="-D_U_=\"\" $CFLAGS" fi and this is, how it looks when there is an unused variable: static void -capture_stop_cb(GtkWidget *w, gpointer data) { +capture_stop_cb(GtkWidget *w _U_, gpointer data) { loop_data *ld = (loop_data *) data; I'll attach two patches that turn on unused warnings and fix them by either adding _U_ or removing the variables/functions that cause the warning. What I'd like to get right now is whether the approach is OK and whether the cases where I removed variables/functions are OK. This patch currently lacks the gtk directory (they are left for my train journey on monday) and the packet-....c files (I'd like to do nothing about them for 3-4 weeks so the maintainers can do their share and fix the remaining stuff afterwards. Ciao Jï¿œrg -- Joerg Mayer <jmayer@xxxxxxxxx> I found out that "pro" means "instead of" (as in proconsul). Now I know what proactive means.
Changelog: <jmayer@xxxxxxxxx> - Turn on warnings in gcc for unused variables - Allow variables to be flagged as unused in gcc Index: ethereal/configure.in =================================================================== RCS file: /cvsroot/ethereal/configure.in,v retrieving revision 1.153 diff -u -r1.153 configure.in --- configure.in 2002/02/05 18:39:05 1.153 +++ configure.in 2002/02/14 22:57:17 @@ -51,13 +51,16 @@ AC_ETHEREAL_RPM_CHECK AC_SUBST(HAVE_RPM) -# If we're running gcc, add '-Wall' to CFLAGS. -AC_MSG_CHECKING(to see if we can add '-Wall' to CFLAGS) + +# If we're running gcc, add '-Wall -W' to CFLAGS. +AC_MSG_CHECKING(to see if we can add '-Wall -W' to CFLAGS) if test x$GCC != x ; then - CFLAGS="-Wall -W -Wno-unused $CFLAGS" + CFLAGS="-Wall -W $CFLAGS" AC_MSG_RESULT(yes) + CFLAGS="-D_U_=\"__attribute__((unused))\" $CFLAGS" else AC_MSG_RESULT(no) + CFLAGS="-D_U_=\"\" $CFLAGS" fi # Index: ethereal/epan/configure.in =================================================================== RCS file: /cvsroot/ethereal/epan/configure.in,v retrieving revision 1.19 diff -u -r1.19 configure.in --- configure.in 2002/02/02 22:27:44 1.19 +++ configure.in 2002/02/14 22:58:24 @@ -29,13 +29,15 @@ AC_SUBST(FLEX_PATH) -# If we're running gcc, add '-Wall' to CFLAGS. -AC_MSG_CHECKING(to see if we can add '-Wall' to CFLAGS) +# If we're running gcc, add '-Wall -W' to CFLAGS. +AC_MSG_CHECKING(to see if we can add '-Wall -W' to CFLAGS) if test x$GCC != x ; then - CFLAGS="-Wall -W -Wno-unused $CFLAGS" + CFLAGS="-Wall -W $CFLAGS" AC_MSG_RESULT(yes) + CFLAGS="-D_U_=\"__attribute__((unused))\" $CFLAGS" else AC_MSG_RESULT(no) + CFLAGS="-D_U_=\"\" $CFLAGS" fi # Index: ethereal/wiretap/configure.in =================================================================== RCS file: /cvsroot/ethereal/wiretap/configure.in,v retrieving revision 1.35 diff -u -r1.35 configure.in --- configure.in 2002/02/06 09:58:30 1.35 +++ configure.in 2002/02/14 22:59:15 @@ -28,13 +28,15 @@ AC_SUBST(FLEX_PATH) -# If we're running gcc, add '-Wall' to CFLAGS. -AC_MSG_CHECKING(to see if we can add '-Wall' to CFLAGS) +# If we're running gcc, add '-Wall -W' to CFLAGS. +AC_MSG_CHECKING(to see if we can add '-Wall -W' to CFLAGS) if test x$GCC != x ; then - CFLAGS="-Wall -W -Wno-unused $CFLAGS" + CFLAGS="-Wall -W $CFLAGS" AC_MSG_RESULT(yes) + CFLAGS="-D_U_=\"__attribute__((unused))\" $CFLAGS" else AC_MSG_RESULT(no) + CFLAGS="-D_U_=\"\" $CFLAGS" fi #
Changelog: <jmayer@xxxxxxxxx> - Declare some variables in function headers as unused. - capture.c: remove unused argument ebuf from pipe_open_live() - file.c: remove unused local variable i - print.c: remove unused argument print_one_packet from proto_tree_print() - xdlc.c: remove unused argument is_response from get_xdlc_control() - epan/int-64bit.c: make use of len instead of using the hardcoded value - epan/packet.c: remove unused argument packet_info from set_actual_length() remove unused local variable info - epan/proto.c: remove unused declaration of check_for_protocol_or_field_id() remove unused functions proto_find_protocol_multi() and traverse_subtree_for_field() - epan/dfilter/semcheck.c: remove unused variable dfw from the funtions semcheck(), check_relation_LHS_FIELD(), check_relation_LHS_STRING(), check_relation_LHS_RANGE(), check_relation(), check_test() - tools/lemon.c: remove unused argument errsym from resolve_conflict() - wiretap/etherpeek.c: remove unused variable etherpeek_v7_encap[] - wiretap/libpcap.c: please read and comment the FIXME - wiretap/visual.c: removed unused local variables rec_offset and tm Index: ethereal/capture.c =================================================================== RCS file: /cvsroot/ethereal/capture.c,v retrieving revision 1.169 diff -u -r1.169 capture.c --- capture.c 2002/02/08 10:07:33 1.169 +++ capture.c 2002/02/14 22:57:12 @@ -223,7 +223,7 @@ #ifndef _WIN32 static void adjust_header(loop_data *, struct pcap_hdr *, struct pcaprec_hdr *); -static int pipe_open_live(char *, struct pcap_hdr *, loop_data *, char *); +static int pipe_open_live(char *, struct pcap_hdr *, loop_data *); static int pipe_dispatch(int, loop_data *, struct pcap_hdr *); #endif @@ -721,7 +721,8 @@ us a message, or the sync pipe has closed, meaning the child has closed it (perhaps because it exited). */ static void -cap_file_input_cb(gpointer data, gint source, GdkInputCondition condition) +cap_file_input_cb(gpointer data, gint source _U_, + GdkInputCondition condition _U_) { capture_file *cf = (capture_file *)data; #define BUFSIZE 4096 @@ -1055,7 +1056,7 @@ * N.B. : we can't read the libpcap formats used in RedHat 6.1 or SuSE 6.3 * because we can't seek on pipes (see wiretap/libpcap.c for details) */ static int -pipe_open_live(char *pipename, struct pcap_hdr *hdr, loop_data *ld, char *ebuf) +pipe_open_live(char *pipename, struct pcap_hdr *hdr, loop_data *ld) { struct stat pipe_stat; int fd; @@ -1378,7 +1379,7 @@ goto error; #else /* try to open cfile.iface as a pipe */ - pipe_fd = pipe_open_live(cfile.iface, &hdr, &ld, open_err_str); + pipe_fd = pipe_open_live(cfile.iface, &hdr, &ld); if (pipe_fd == -1) { /* Well, we couldn't start the capture. @@ -1944,18 +1945,18 @@ } static void -stop_capture(int signo) +stop_capture(int signo _U_) { ld.go = FALSE; } static void -capture_delete_cb(GtkWidget *w, GdkEvent *event, gpointer data) { +capture_delete_cb(GtkWidget *w _U_, GdkEvent *event _U_, gpointer data) { capture_stop_cb(NULL, data); } static void -capture_stop_cb(GtkWidget *w, gpointer data) { +capture_stop_cb(GtkWidget *w _U_, gpointer data) { loop_data *ld = (loop_data *) data; ld->go = FALSE; Index: ethereal/capture_stop_conditions.c =================================================================== RCS file: /cvsroot/ethereal/capture_stop_conditions.c,v retrieving revision 1.2 diff -u -r1.2 capture_stop_conditions.c --- capture_stop_conditions.c 2001/12/04 08:25:55 1.2 +++ capture_stop_conditions.c 2002/02/14 22:57:13 @@ -114,7 +114,7 @@ * returns: TRUE - Condition is true. * FALSE - Condition is false. */ -static gboolean _cnd_eval_timeout(condition* cnd, va_list ap){ +static gboolean _cnd_eval_timeout(condition* cnd, va_list ap _U_){ cnd_timeout_dat* data = (cnd_timeout_dat*)cnd_get_user_data(cnd); gint32 elapsed_time; /* check timeout here */ @@ -204,5 +204,5 @@ * * parameter: cnd - Pointer to an initialized condition. */ -static void _cnd_reset_capturesize(condition *cnd){ +static void _cnd_reset_capturesize(condition *cnd _U_){ } /* END _cnd_reset_capturesize() */ Index: ethereal/conditions.c =================================================================== RCS file: /cvsroot/ethereal/conditions.c,v retrieving revision 1.1 diff -u -r1.1 conditions.c --- conditions.c 2001/12/04 07:32:00 1.1 +++ conditions.c 2002/02/14 22:57:14 @@ -197,7 +197,7 @@ * to the key is stored in a global variable. */ void _cnd_find_hash_key_for_class_id(gpointer key, - gpointer value, + gpointer value _U_, gpointer user_data){ char* class_id = (char*)user_data; char* key_value = (char*)key; Index: ethereal/editcap.c =================================================================== RCS file: /cvsroot/ethereal/editcap.c,v retrieving revision 1.19 diff -u -r1.19 editcap.c --- editcap.c 2002/02/08 10:07:33 1.19 +++ editcap.c 2002/02/14 22:57:18 @@ -137,7 +137,7 @@ */ static void -edit_callback(u_char *user, const struct wtap_pkthdr *phdr, long offset, +edit_callback(u_char *user, const struct wtap_pkthdr *phdr, long offset _U_, union wtap_pseudo_header *pseudo_header, const u_char *buf) { callback_arg *argp = (callback_arg *)user; Index: ethereal/file.c =================================================================== RCS file: /cvsroot/ethereal/file.c,v retrieving revision 1.260 diff -u -r1.260 file.c --- file.c 2002/02/08 10:07:34 1.260 +++ file.c 2002/02/14 22:57:27 @@ -633,7 +633,7 @@ gboolean refilter) { apply_color_filter_args args; - gint i, row; + gint row; gboolean create_proto_tree = FALSE; epan_dissect_t *edt; GdkColor fg, bg; @@ -1245,7 +1245,7 @@ epan_dissect_run(edt, &cf->pseudo_header, cf->pd, fdata, NULL); /* Print the information in that tree. */ - proto_tree_print(FALSE, print_args, (GNode *)edt->tree, + proto_tree_print(print_args, (GNode *)edt->tree, fdata, cf->print_fh); if (print_args->print_hex) { Index: ethereal/mergecap.c =================================================================== RCS file: /cvsroot/ethereal/mergecap.c,v retrieving revision 1.6 diff -u -r1.6 mergecap.c --- mergecap.c 2002/02/08 10:07:34 1.6 +++ mergecap.c 2002/02/14 22:57:29 @@ -65,7 +65,7 @@ * Routine to write frame to output file */ static void -write_frame(u_char *user, const struct wtap_pkthdr *phdr, long offset, +write_frame(u_char *user, const struct wtap_pkthdr *phdr, long offset _U_, union wtap_pseudo_header *pseudo_header, const u_char *buf) { wtap_dumper *pdh = (wtap_dumper*)user; Index: ethereal/packet-eap.c =================================================================== RCS file: /cvsroot/ethereal/packet-eap.c,v retrieving revision 1.6 diff -u -r1.6 packet-eap.c --- packet-eap.c 2002/02/06 22:45:43 1.6 +++ packet-eap.c 2002/02/14 22:57:30 @@ -94,7 +94,7 @@ len = eaph.eap_len; - set_actual_length(tvb, pinfo, len); + set_actual_length(tvb, len); eap_tree = NULL; Index: ethereal/packet-eapol.c =================================================================== RCS file: /cvsroot/ethereal/packet-eapol.c,v retrieving revision 1.5 diff -u -r1.5 packet-eapol.c --- packet-eapol.c 2002/01/21 07:36:34 1.5 +++ packet-eapol.c 2002/02/14 22:57:31 @@ -87,7 +87,7 @@ len = sizeof(eapolh) + eapolh.eapol_len; - set_actual_length(tvb, pinfo, len); + set_actual_length(tvb, len); eapol_tree = NULL; Index: ethereal/packet-ip.c =================================================================== RCS file: /cvsroot/ethereal/packet-ip.c,v retrieving revision 1.160 diff -u -r1.160 packet-ip.c --- packet-ip.c 2002/02/01 12:04:54 1.160 +++ packet-ip.c 2002/02/14 22:57:39 @@ -846,7 +846,7 @@ len = iph.ip_len; /* Adjust the length of this tvbuff to include only the IP datagram. */ - set_actual_length(tvb, pinfo, len); + set_actual_length(tvb, len); hlen = lo_nibble(iph.ip_v_hl) * 4; /* IP header length, in bytes */ Index: ethereal/packet-ipv6.c =================================================================== RCS file: /cvsroot/ethereal/packet-ipv6.c,v retrieving revision 1.75 diff -u -r1.75 packet-ipv6.c --- packet-ipv6.c 2002/01/21 07:36:35 1.75 +++ packet-ipv6.c 2002/02/14 22:57:44 @@ -675,7 +675,7 @@ plen = ntohs(ipv6.ip6_plen); /* Adjust the length of this tvbuff to include only the IPv6 datagram. */ - set_actual_length(tvb, pinfo, plen + sizeof (struct ip6_hdr)); + set_actual_length(tvb, plen + sizeof (struct ip6_hdr)); SET_ADDRESS(&pinfo->net_src, AT_IPv6, 16, tvb_get_ptr(tvb, offset + IP6H_SRC, 16)); SET_ADDRESS(&pinfo->src, AT_IPv6, 16, tvb_get_ptr(tvb, offset + IP6H_SRC, 16)); Index: ethereal/packet-ipx.c =================================================================== RCS file: /cvsroot/ethereal/packet-ipx.c,v retrieving revision 1.101 diff -u -r1.101 packet-ipx.c --- packet-ipx.c 2002/01/24 09:20:48 1.101 +++ packet-ipx.c 2002/02/14 22:57:48 @@ -224,7 +224,7 @@ ipx_length = tvb_get_ntohs(tvb, 2); /* Adjust the tvbuff length to include only the IPX datagram. */ - set_actual_length(tvb, pinfo, ipx_length); + set_actual_length(tvb, ipx_length); src_net_node = tvb_get_ptr(tvb, 18, 10); dst_net_node = tvb_get_ptr(tvb, 6, 10); Index: ethereal/packet-llc.c =================================================================== RCS file: /cvsroot/ethereal/packet-llc.c,v retrieving revision 1.95 diff -u -r1.95 packet-llc.c --- packet-llc.c 2002/01/21 07:36:37 1.95 +++ packet-llc.c 2002/02/14 22:57:51 @@ -213,8 +213,7 @@ * uses extended operation, so we don't need to determine * whether it's basic or extended operation; is that the case? */ - control = get_xdlc_control(pd, offset+2, pd[offset+1] & SSAP_CR_BIT, - TRUE); + control = get_xdlc_control(pd, offset+2, pd[offset+1] & SSAP_CR_BIT); llc_header_len += XDLC_CONTROL_LEN(control, TRUE); if (is_snap) llc_header_len += 5; /* 3 bytes of OUI, 2 bytes of protocol ID */ Index: ethereal/pcap-util.c =================================================================== RCS file: /cvsroot/ethereal/pcap-util.c,v retrieving revision 1.3 diff -u -r1.3 pcap-util.c --- pcap-util.c 2001/11/09 08:16:24 1.3 +++ pcap-util.c 2002/02/14 22:57:58 @@ -75,7 +75,11 @@ * rest-of-the-universe libpcap. */ int -get_pcap_linktype(pcap_t *pch, char *devname) +get_pcap_linktype(pcap_t *pch, char *devname +#ifndef AIX + _U_ +#endif +) { int linktype; #ifdef AIX @@ -431,7 +435,7 @@ #endif static void -free_if_cb(gpointer data, gpointer user_data) +free_if_cb(gpointer data, gpointer user_data _U_) { g_free(data); } Index: ethereal/prefs.c =================================================================== RCS file: /cvsroot/ethereal/prefs.c,v retrieving revision 1.80 diff -u -r1.80 prefs.c --- prefs.c 2002/01/21 07:36:48 1.80 +++ prefs.c 2002/02/14 22:58:06 @@ -212,7 +212,7 @@ } static void -call_apply_cb(gpointer data, gpointer user_data) +call_apply_cb(gpointer data, gpointer user_data _U_) { module_t *module = data; Index: ethereal/print.c =================================================================== RCS file: /cvsroot/ethereal/print.c,v retrieving revision 1.39 diff -u -r1.39 print.c --- print.c 2002/01/21 07:36:48 1.39 +++ print.c 2002/02/14 22:58:07 @@ -96,7 +96,7 @@ print_ps_finale(fh); } -void proto_tree_print(gboolean print_one_packet, print_args_t *print_args, +void proto_tree_print(print_args_t *print_args, GNode *protocol_tree, frame_data *fd, FILE *fh) { print_data data; Index: ethereal/print.h =================================================================== RCS file: /cvsroot/ethereal/print.h,v retrieving revision 1.25 diff -u -r1.25 print.h --- print.h 2002/01/21 07:36:48 1.25 +++ print.h 2002/02/14 22:58:08 @@ -56,7 +56,7 @@ void close_print_dest(int to_file, FILE *fh); void print_preamble(FILE *fh, gint format); void print_finale(FILE *fh, gint format); -void proto_tree_print(gboolean print_one_packet, print_args_t *print_args, +void proto_tree_print(print_args_t *print_args, GNode *protocol_tree, frame_data *fd, FILE *fh); void print_hex_data(FILE *fh, gint format, frame_data *fd); void print_line(FILE *fh, gint format, char *line); Index: ethereal/proto_hier_stats.c =================================================================== RCS file: /cvsroot/ethereal/proto_hier_stats.c,v retrieving revision 1.11 diff -u -r1.11 proto_hier_stats.c --- proto_hier_stats.c 2002/01/21 07:36:48 1.11 +++ proto_hier_stats.c 2002/02/14 22:58:09 @@ -238,7 +238,7 @@ } static gboolean -stat_node_free(GNode *node, gpointer data) +stat_node_free(GNode *node, gpointer data _U_) { ph_stats_node_t *stats = node->data; Index: ethereal/reassemble.c =================================================================== RCS file: /cvsroot/ethereal/reassemble.c,v retrieving revision 1.9 diff -u -r1.9 reassemble.c --- reassemble.c 2002/02/03 23:28:38 1.9 +++ reassemble.c 2002/02/14 22:58:12 @@ -102,7 +102,7 @@ * (The actual key and value structures get freed by "reassemble_init()".) */ static gboolean -free_all_fragments(gpointer key_arg, gpointer value, gpointer user_data) +free_all_fragments(gpointer key_arg, gpointer value, gpointer user_data _U_) { fragment_key *key = key_arg; fragment_data *fd_head; Index: ethereal/ringbuffer.c =================================================================== RCS file: /cvsroot/ethereal/ringbuffer.c,v retrieving revision 1.1 diff -u -r1.1 ringbuffer.c --- ringbuffer.c 2001/12/04 08:45:04 1.1 +++ ringbuffer.c 2002/02/14 22:58:13 @@ -225,7 +225,7 @@ * Switches to the next ringbuffer file */ gboolean -ringbuf_switch_file(capture_file *cf, wtap_dumper **pdh, int *err) +ringbuf_switch_file(capture_file *cf, wtap_dumper **pdh, int *err _U_) { int next_file_num; FILE *fh; Index: ethereal/tethereal.c =================================================================== RCS file: /cvsroot/ethereal/tethereal.c,v retrieving revision 1.121 diff -u -r1.121 tethereal.c --- tethereal.c 2002/02/08 10:07:34 1.121 +++ tethereal.c 2002/02/14 22:58:21 @@ -1067,7 +1067,7 @@ } static void -capture_cleanup(int signum) +capture_cleanup(int signum _U_) { /* Longjmp back to the starting point; "pcap_dispatch()", on many platforms, just keeps looping if it gets EINTR, so if we set @@ -1200,10 +1200,8 @@ static void fill_in_fdata(frame_data *fdata, capture_file *cf, const struct wtap_pkthdr *phdr, - const union wtap_pseudo_header *pseudo_header, long offset) + const union wtap_pseudo_header *pseudo_header _U_, long offset) { - int i; - fdata->next = NULL; fdata->prev = NULL; fdata->pfd = NULL; @@ -1407,7 +1405,7 @@ print_args.print_hex = print_hex; print_args.expand_all = TRUE; print_args.suppress_unmarked = FALSE; - proto_tree_print(FALSE, &print_args, (GNode *)edt->tree, + proto_tree_print(&print_args, (GNode *)edt->tree, &fdata, stdout); if (!print_hex) { /* "print_hex_data()" will put out a leading blank line, as well Index: ethereal/xdlc.c =================================================================== RCS file: /cvsroot/ethereal/xdlc.c,v retrieving revision 1.17 diff -u -r1.17 xdlc.c --- xdlc.c 2002/01/21 07:36:48 1.17 +++ xdlc.c 2002/02/14 22:58:22 @@ -159,7 +159,7 @@ }; int -get_xdlc_control(const u_char *pd, int offset, int is_response, int is_extended) +get_xdlc_control(const u_char *pd, int offset, int is_extended) { guint16 control; Index: ethereal/xdlc.h =================================================================== RCS file: /cvsroot/ethereal/xdlc.h,v retrieving revision 1.14 diff -u -r1.14 xdlc.h --- xdlc.h 2000/08/11 13:33:50 1.14 +++ xdlc.h 2002/02/14 22:58:23 @@ -79,7 +79,7 @@ #define XDLC_CONTROL_LEN(control, is_extended) \ ((((control) & 0x3) == XDLC_U || !(is_extended)) ? 1 : 2) -int get_xdlc_control(const u_char *pd, int offset, int is_response, +int get_xdlc_control(const u_char *pd, int offset, int extended); int dissect_xdlc_control(tvbuff_t *tvb, int offset, packet_info *pinfo, Index: ethereal/epan/filesystem.c =================================================================== RCS file: /cvsroot/ethereal/epan/filesystem.c,v retrieving revision 1.16 diff -u -r1.16 filesystem.c --- filesystem.c 2002/01/04 21:50:26 1.16 +++ filesystem.c 2002/02/14 22:58:26 @@ -528,7 +528,11 @@ * from earlier versions can be read. */ char * -get_persconffile_path(const char *filename, gboolean for_writing) +get_persconffile_path(const char *filename, gboolean for_writing +#ifndef WIN32 + _U_ +#endif +) { char *path; #ifdef WIN32 Index: ethereal/epan/int-64bit.c =================================================================== RCS file: /cvsroot/ethereal/epan/int-64bit.c,v retrieving revision 1.1 diff -u -r1.1 int-64bit.c --- int-64bit.c 2001/11/22 03:07:06 1.1 +++ int-64bit.c 2002/02/14 22:58:28 @@ -264,7 +264,7 @@ { int i; - for(i=U64STRLEN-1;i>=0;i--){ + for(i=len-1;i>=0;i--){ if(s1[i]==s2[i]){ continue; } Index: ethereal/epan/packet.c =================================================================== RCS file: /cvsroot/ethereal/epan/packet.c,v retrieving revision 1.58 diff -u -r1.58 packet.c --- packet.c 2002/02/11 19:02:56 1.58 +++ packet.c 2002/02/14 22:58:31 @@ -104,7 +104,7 @@ * adjust the length of the tvbuff to reflect the specified length. */ void -set_actual_length(tvbuff_t *tvb, packet_info *pinfo, guint specified_len) +set_actual_length(tvbuff_t *tvb, guint specified_len) { guint payload_len, reported_payload_len; @@ -137,7 +137,7 @@ /* Call all the registered "init" routines. */ static void -call_init_routine(gpointer routine, gpointer dummy) +call_init_routine(gpointer routine, gpointer dummy _U_) { void (*func)(void) = routine; @@ -166,7 +166,7 @@ /* Call all the registered "postseq_cleanup" routines. */ static void -call_postseq_cleanup_routine(gpointer routine, gpointer dummy) +call_postseq_cleanup_routine(gpointer routine, gpointer dummy _U_) { void (*func)(void) = routine; @@ -337,7 +337,8 @@ /* If temporary dissectors are deleted, then the original dissector must */ /* be available. */ void -dissector_delete(const char *name, guint32 pattern, dissector_handle_t handle) +dissector_delete(const char *name, guint32 pattern, + dissector_handle_t handle _U_) { dissector_table_t sub_dissectors = find_dissector_table( name); dtbl_entry_t *dtbl_entry; @@ -655,7 +656,6 @@ void dissector_table_foreach_handle(char *name, DATFunc_handle func, gpointer user_data) { - dissector_foreach_info_t info; dissector_table_t sub_dissectors = find_dissector_table( name); GSList *tmp; Index: ethereal/epan/packet.h =================================================================== RCS file: /cvsroot/ethereal/epan/packet.h,v retrieving revision 1.50 diff -u -r1.50 packet.h --- packet.h 2002/02/06 22:19:04 1.50 +++ packet.h 2002/02/14 22:58:32 @@ -205,13 +205,12 @@ extern void dissect_cleanup(void); /* - * Given a tvbuff, a packet_info *, and a length from a packet header, + * Given a tvbuff and a length from a packet header, * adjust the length of the tvbuff, and the "len" and "captured_len" * members of the "packet_info" structure, to reflect the specified * length. */ -extern void set_actual_length(tvbuff_t *tvb, packet_info *pinfo, - guint specified_len); +extern void set_actual_length(tvbuff_t *tvb, guint specified_len); /* Allow protocols to register "init" routines, which are called before we make a pass through a capture file and dissect all its packets Index: ethereal/epan/proto.c =================================================================== RCS file: /cvsroot/ethereal/epan/proto.c,v retrieving revision 1.51 diff -u -r1.51 proto.c --- proto.c 2002/02/01 04:34:17 1.51 +++ proto.c 2002/02/14 22:58:41 @@ -67,8 +67,6 @@ static char* hfinfo_int_vals_format(header_field_info *hfinfo); static char* hfinfo_int_format(header_field_info *hfinfo); -static gboolean check_for_protocol_or_field_id(GNode *node, gpointer data); - static proto_item* proto_tree_add_node(proto_tree *tree, field_info *fi); @@ -299,7 +297,7 @@ } static void -free_GPtrArray_value(gpointer key, gpointer value, gpointer user_data) +free_GPtrArray_value(gpointer key _U_, gpointer value, gpointer user_data _U_) { GPtrArray *ptrs = value; @@ -331,7 +329,7 @@ } static gboolean -proto_tree_free_node(GNode *node, gpointer data) +proto_tree_free_node(GNode *node, gpointer data _U_) { field_info *finfo = PITEM_FINFO(node); @@ -2725,35 +2723,6 @@ GNode *node; } result; } proto_tree_search_info; - -/* Looks for a protocol at the top layer of the tree. The protocol can occur - * more than once, for those encapsulated protocols. For each protocol subtree - * that is found, the callback function is called. - */ -static void -proto_find_protocol_multi(proto_tree* tree, GNodeTraverseFunc callback, - proto_tree_search_info *sinfo) -{ - g_assert(callback != NULL); - g_node_traverse((GNode*)tree, G_IN_ORDER, G_TRAVERSE_ALL, 2, callback, (gpointer*)sinfo); -} - -/* Calls a traversal function for all subtrees. - */ -static gboolean -traverse_subtree_for_field(GNode *node, gpointer data) -{ - field_info *fi = PITEM_FINFO(node); - proto_tree_search_info *sinfo = (proto_tree_search_info*) data; - - if (fi) { /* !fi == the top most container node which holds nothing */ - g_node_traverse(node, G_IN_ORDER, G_TRAVERSE_ALL, -1, - sinfo->traverse_func, sinfo); - if (sinfo->result.node) - return sinfo->halt_on_first_hit; /* halt? continue? */ - } - return FALSE; /* keep traversing */ -} /* Looks for a protocol or a field in a proto_tree. Returns TRUE if * it exists anywhere, or FALSE if it exists nowhere. */ Index: ethereal/epan/resolv.c =================================================================== RCS file: /cvsroot/ethereal/epan/resolv.c,v retrieving revision 1.21 diff -u -r1.21 resolv.c --- resolv.c 2002/01/30 08:46:29 1.21 +++ resolv.c 2002/02/14 22:58:45 @@ -252,7 +252,7 @@ jmp_buf hostname_env; -static void abort_network_query(int sig) +static void abort_network_query(int sig _U_) { longjmp(hostname_env, 1); } Index: ethereal/epan/dfilter/drange.c =================================================================== RCS file: /cvsroot/ethereal/epan/dfilter/drange.c,v retrieving revision 1.2 diff -u -r1.2 drange.c --- drange.c 2001/03/02 17:04:23 1.2 +++ drange.c 2002/02/14 22:58:46 @@ -138,7 +138,7 @@ static void -drange_node_free_wrapper(gpointer data, gpointer userdata) +drange_node_free_wrapper(gpointer data, gpointer userdata _U_) { g_free(data); } Index: ethereal/epan/dfilter/gencode.c =================================================================== RCS file: /cvsroot/ethereal/epan/dfilter/gencode.c,v retrieving revision 1.5 diff -u -r1.5 gencode.c --- gencode.c 2002/01/21 07:37:37 1.5 +++ gencode.c 2002/02/14 22:58:47 @@ -333,7 +333,7 @@ } hash_key_iterator; static void -get_hash_key(gpointer key, gpointer value, gpointer user_data) +get_hash_key(gpointer key, gpointer value _U_, gpointer user_data) { int field_id = GPOINTER_TO_INT(key); hash_key_iterator *hki = user_data; Index: ethereal/epan/dfilter/semcheck.c =================================================================== RCS file: /cvsroot/ethereal/epan/dfilter/semcheck.c,v retrieving revision 1.8 diff -u -r1.8 semcheck.c --- semcheck.c 2002/01/21 07:37:37 1.8 +++ semcheck.c 2002/02/14 22:58:48 @@ -35,7 +35,7 @@ #include <epan/packet.h> static void -semcheck(dfwork_t *dfw, stnode_t *st_node); +semcheck(stnode_t *st_node); typedef gboolean (*FtypeCanFunc)(enum ftenum); @@ -247,7 +247,7 @@ } static void -check_relation_LHS_FIELD(dfwork_t *dfw, FtypeCanFunc can_func, stnode_t *st_node, +check_relation_LHS_FIELD(FtypeCanFunc can_func, stnode_t *st_node, stnode_t *st_arg1, stnode_t *st_arg2) { stnode_t *new_st; @@ -330,7 +330,7 @@ } static void -check_relation_LHS_STRING(dfwork_t *dfw, FtypeCanFunc can_func, stnode_t *st_node, +check_relation_LHS_STRING(FtypeCanFunc can_func _U_, stnode_t *st_node, stnode_t *st_arg1, stnode_t *st_arg2) { stnode_t *new_st; @@ -384,7 +384,7 @@ } static void -check_relation_LHS_RANGE(dfwork_t *dfw, FtypeCanFunc can_func, stnode_t *st_node, +check_relation_LHS_RANGE(FtypeCanFunc can_func _U_, stnode_t *st_node, stnode_t *st_arg1, stnode_t *st_arg2) { stnode_t *new_st; @@ -451,18 +451,18 @@ static void -check_relation(dfwork_t *dfw, FtypeCanFunc can_func, stnode_t *st_node, +check_relation(FtypeCanFunc can_func, stnode_t *st_node, stnode_t *st_arg1, stnode_t *st_arg2) { switch (stnode_type_id(st_arg1)) { case STTYPE_FIELD: - check_relation_LHS_FIELD(dfw, can_func, st_node, st_arg1, st_arg2); + check_relation_LHS_FIELD(can_func, st_node, st_arg1, st_arg2); break; case STTYPE_STRING: - check_relation_LHS_STRING(dfw, can_func, st_node, st_arg1, st_arg2); + check_relation_LHS_STRING(can_func, st_node, st_arg1, st_arg2); break; case STTYPE_RANGE: - check_relation_LHS_RANGE(dfw, can_func, st_node, st_arg1, st_arg2); + check_relation_LHS_RANGE(can_func, st_node, st_arg1, st_arg2); break; case STTYPE_UNINITIALIZED: @@ -475,7 +475,7 @@ } static void -check_test(dfwork_t *dfw, stnode_t *st_node) +check_test(stnode_t *st_node) { test_op_t st_op; stnode_t *st_arg1, *st_arg2; @@ -492,39 +492,39 @@ break; case TEST_OP_NOT: - semcheck(dfw, st_arg1); + semcheck(st_arg1); break; case TEST_OP_AND: case TEST_OP_OR: - semcheck(dfw, st_arg1); - semcheck(dfw, st_arg2); + semcheck(st_arg1); + semcheck(st_arg2); break; case TEST_OP_EQ: - check_relation(dfw, ftype_can_eq, st_node, st_arg1, st_arg2); + check_relation(ftype_can_eq, st_node, st_arg1, st_arg2); break; case TEST_OP_NE: - check_relation(dfw, ftype_can_ne, st_node, st_arg1, st_arg2); + check_relation(ftype_can_ne, st_node, st_arg1, st_arg2); break; case TEST_OP_GT: - check_relation(dfw, ftype_can_gt, st_node, st_arg1, st_arg2); + check_relation(ftype_can_gt, st_node, st_arg1, st_arg2); break; case TEST_OP_GE: - check_relation(dfw, ftype_can_ge, st_node, st_arg1, st_arg2); + check_relation(ftype_can_ge, st_node, st_arg1, st_arg2); break; case TEST_OP_LT: - check_relation(dfw, ftype_can_lt, st_node, st_arg1, st_arg2); + check_relation(ftype_can_lt, st_node, st_arg1, st_arg2); break; case TEST_OP_LE: - check_relation(dfw, ftype_can_le, st_node, st_arg1, st_arg2); + check_relation(ftype_can_le, st_node, st_arg1, st_arg2); break; } } static void -semcheck(dfwork_t *dfw, stnode_t *st_node) +semcheck(stnode_t *st_node) { const char *name; @@ -532,7 +532,7 @@ switch (stnode_type_id(st_node)) { case STTYPE_TEST: - check_test(dfw, st_node); + check_test(st_node); break; default: g_assert_not_reached(); @@ -544,7 +544,7 @@ dfw_semcheck(dfwork_t *dfw) { TRY { - semcheck(dfw, dfw->st_root); + semcheck(dfw->st_root); } CATCH(TypeError) { return FALSE; Index: ethereal/epan/ftypes/ftype-string.c =================================================================== RCS file: /cvsroot/ethereal/epan/ftypes/ftype-string.c,v retrieving revision 1.5 diff -u -r1.5 ftype-string.c --- ftype-string.c 2002/02/05 22:50:17 1.5 +++ ftype-string.c 2002/02/14 22:58:49 @@ -60,7 +60,7 @@ } static gboolean -val_from_string(fvalue_t *fv, char *s, LogFunc logfunc) +val_from_string(fvalue_t *fv, char *s, LogFunc logfunc _U_) { fv->value.string = g_strdup(s); return TRUE; Index: ethereal/gtk/print_dlg.c =================================================================== RCS file: /cvsroot/ethereal/gtk/print_dlg.c,v retrieving revision 1.29 diff -u -r1.29 print_dlg.c --- print_dlg.c 2002/01/21 07:37:42 1.29 +++ print_dlg.c 2002/02/14 22:58:52 @@ -631,7 +631,7 @@ print_args.print_hex = FALSE; print_args.expand_all = TRUE; print_args.suppress_unmarked = FALSE; - proto_tree_print(TRUE, &print_args, (GNode*) cfile.edt->tree, + proto_tree_print(&print_args, (GNode*) cfile.edt->tree, cfile.current_frame, fh); print_finale(fh, prefs.pr_format); close_print_dest(print_args.to_file, fh); Index: ethereal/tools/lemon/lemon.c =================================================================== RCS file: /cvsroot/ethereal/tools/lemon/lemon.c,v retrieving revision 1.12 diff -u -r1.12 lemon.c --- lemon.c 2002/01/30 22:55:15 1.12 +++ lemon.c 2002/02/14 22:59:08 @@ -739,7 +739,7 @@ }while( progress ); } -static int resolve_conflict(struct action *, struct action *, struct symbol *); +static int resolve_conflict(struct action *, struct action *); /* Compute the reduce actions, and resolve conflicts. */ @@ -793,7 +793,7 @@ for(nap=ap->next; nap && nap->sp==ap->sp; nap=nap->next){ /* The two actions "ap" and "nap" have the same lookahead. ** Figure out which one should be used */ - lemp->nconflict += resolve_conflict(ap,nap,lemp->errsym); + lemp->nconflict += resolve_conflict(ap,nap); } } } @@ -828,8 +828,7 @@ */ static int resolve_conflict( struct action *apx, - struct action *apy, - struct symbol *errsym) /* The error symbol (if defined. NULL otherwise) */ + struct action *apy) { struct symbol *spx, *spy; int errcnt = 0; @@ -1194,7 +1193,7 @@ /* The main program. Parse the command line and do it... */ -int main(int argc, char **argv) +int main(int argc _U_, char **argv) { static int version = 0; static int rpflag = 0; Index: ethereal/tools/lemon/lempar.c =================================================================== RCS file: /cvsroot/ethereal/tools/lemon/lempar.c,v retrieving revision 1.2 diff -u -r1.2 lempar.c --- lempar.c 2001/02/15 06:22:46 1.2 +++ lempar.c 2002/02/14 22:59:10 @@ -422,10 +422,10 @@ ** The following code executes when a syntax error first occurs. */ static void yy_syntax_error( - yyParser *yypParser, /* The parser */ - int yymajor, /* The major type of the error token */ + yyParser *yypParser _U_, /* The parser */ + int yymajor _U_, /* The major type of the error token */ YYMINORTYPE yyminor /* The minor type of the error token */ - ParseANSIARGDECL /* Extra arguments (if any) */ + ParseANSIARGDECL _U_ /* Extra arguments (if any) */ ){ #define TOKEN (yyminor.yy0) %% @@ -436,7 +436,7 @@ */ static void yy_accept( yyParser *yypParser /* The parser */ - ParseANSIARGDECL /* Extra arguments (if any) */ + ParseANSIARGDECL _U_ /* Extra arguments (if any) */ ){ #ifndef NDEBUG if( yyTraceFILE ){ Index: ethereal/wiretap/ascend-grammar.y =================================================================== RCS file: /cvsroot/ethereal/wiretap/ascend-grammar.y,v retrieving revision 1.23 diff -u -r1.23 ascend-grammar.y --- ascend-grammar.y 2001/12/06 08:25:51 1.23 +++ ascend-grammar.y 2002/02/14 22:59:12 @@ -409,7 +409,6 @@ } void -yyerror (char *s) +yyerror (char *s _U_) { - /* fprintf (stderr, "%s\n", s); */ } Index: ethereal/wiretap/ascend.c =================================================================== RCS file: /cvsroot/ethereal/wiretap/ascend.c,v retrieving revision 1.26 diff -u -r1.26 ascend.c --- ascend.c 2001/11/13 23:55:43 1.26 +++ ascend.c 2002/02/14 22:59:14 @@ -200,7 +200,7 @@ } /* XXX - return -1 on I/O error and actually do something with 'err'. */ -int ascend_open(wtap *wth, int *err) +int ascend_open(wtap *wth, int *err _U_) { long offset; struct stat statbuf; Index: ethereal/wiretap/csids.c =================================================================== RCS file: /cvsroot/ethereal/wiretap/csids.c,v retrieving revision 1.9 diff -u -r1.9 csids.c --- csids.c 2002/02/08 10:07:40 1.9 +++ csids.c 2002/02/14 22:59:16 @@ -195,7 +195,7 @@ static int csids_seek_read (wtap *wth, long seek_off, - union wtap_pseudo_header *pseudo_header, + union wtap_pseudo_header *pseudo_header _U_, guint8 *pd, int len) { Index: ethereal/wiretap/dbs-etherwatch.c =================================================================== RCS file: /cvsroot/ethereal/wiretap/dbs-etherwatch.c,v retrieving revision 1.3 diff -u -r1.3 dbs-etherwatch.c --- dbs-etherwatch.c 2002/02/08 10:07:40 1.3 +++ dbs-etherwatch.c 2002/02/14 22:59:17 @@ -150,7 +150,7 @@ /* XXX - return -1 on I/O error and actually do something with 'err'. */ -int dbs_etherwatch_open(wtap *wth, int *err) +int dbs_etherwatch_open(wtap *wth, int *err _U_) { /* Look for DBS ETHERWATCH header */ if (!dbs_etherwatch_check_file_type(wth)) { @@ -199,7 +199,7 @@ /* Used to read packets in random-access fashion */ static int dbs_etherwatch_seek_read (wtap *wth, long seek_off, - union wtap_pseudo_header *pseudo_header, + union wtap_pseudo_header *pseudo_header _U_, guint8 *pd, int len) { int pkt_len; Index: ethereal/wiretap/etherpeek.c =================================================================== RCS file: /cvsroot/ethereal/wiretap/etherpeek.c,v retrieving revision 1.15 diff -u -r1.15 etherpeek.c --- etherpeek.c 2002/02/08 10:07:40 1.15 +++ etherpeek.c 2002/02/14 22:59:19 @@ -138,11 +138,6 @@ { etherpeek_header_t ep_hdr; struct timeval reference_time; - static const int etherpeek_v7_encap[] = { - WTAP_ENCAP_ETHERNET, - WTAP_ENCAP_TOKEN_RING, - }; - #define NUM_ETHERPEEK_V7_ENCAPS (sizeof etherpeek_v7_encap / sizeof etherpeek_v7_encap[0]) int file_encap; /* EtherPeek files do not start with a magic value large enough @@ -334,7 +329,6 @@ guint8 status; etherpeek_utime timestamp; double t; - unsigned int i; wtap_file_read_expected_bytes(ep_pkt, sizeof(ep_pkt), wth->fh, err); wth->data_offset += sizeof(ep_pkt); Index: ethereal/wiretap/file.c =================================================================== RCS file: /cvsroot/ethereal/wiretap/file.c,v retrieving revision 1.80 diff -u -r1.80 file.c --- file.c 2002/01/23 06:32:52 1.80 +++ file.c 2002/02/14 22:59:21 @@ -123,7 +123,8 @@ #define N_FILE_TYPES (sizeof open_routines / sizeof open_routines[0]) int wtap_def_seek_read(wtap *wth, long seek_off, - union wtap_pseudo_header *pseudo_header, guint8 *pd, int len) + union wtap_pseudo_header *pseudo_header _U_, + guint8 *pd, int len) { file_seek(wth->random_fh, seek_off, SEEK_SET); @@ -559,7 +560,7 @@ } static gboolean wtap_dump_open_finish(wtap_dumper *wdh, int filetype, - int encap, int snaplen, int *err) + int encap _U_, int snaplen _U_, int *err) { /* Now try to open the file for writing. */ if (!(*dump_open_table[filetype].dump_open)(wdh, err)) { Index: ethereal/wiretap/libpcap.c =================================================================== RCS file: /cvsroot/ethereal/wiretap/libpcap.c,v retrieving revision 1.65 diff -u -r1.65 libpcap.c --- libpcap.c 2002/02/07 20:41:28 1.65 +++ libpcap.c 2002/02/14 22:59:26 @@ -983,7 +983,9 @@ /* Returns 0 if we could write the specified encapsulation type, an error indication otherwise. */ -int libpcap_dump_can_write_encap(int filetype, int encap) +/* FIXME: is anyone still interested in using filetype or may I + remove it? */ +int libpcap_dump_can_write_encap(int filetype _U_, int encap) { /* Per-packet encapsulations aren't supported. */ if (encap == WTAP_ENCAP_PER_PACKET) @@ -1060,8 +1062,10 @@ /* Write a record for a packet to a dump file. Returns TRUE on success, FALSE on failure. */ -static gboolean libpcap_dump(wtap_dumper *wdh, const struct wtap_pkthdr *phdr, - const union wtap_pseudo_header *pseudo_header, const u_char *pd, int *err) +static gboolean libpcap_dump(wtap_dumper *wdh, + const struct wtap_pkthdr *phdr, + const union wtap_pseudo_header *pseudo_header _U_, + const u_char *pd, int *err) { struct pcaprec_ss990915_hdr rec_hdr; size_t hdr_size; Index: ethereal/wiretap/netmon.c =================================================================== RCS file: /cvsroot/ethereal/wiretap/netmon.c,v retrieving revision 1.47 diff -u -r1.47 netmon.c --- netmon.c 2002/02/08 10:07:40 1.47 +++ netmon.c 2002/02/14 22:59:30 @@ -542,7 +542,7 @@ /* Returns 0 if we could write the specified encapsulation type, an error indication otherwise. */ -int netmon_dump_can_write_encap(int filetype, int encap) +int netmon_dump_can_write_encap(int filetype _U_, int encap) { /* Per-packet encapsulations aren't supported. */ if (encap == WTAP_ENCAP_PER_PACKET) @@ -556,7 +556,7 @@ /* Returns TRUE on success, FALSE on failure; sets "*err" to an error code on failure */ -gboolean netmon_dump_open(wtap_dumper *wdh, int *err) +gboolean netmon_dump_open(wtap_dumper *wdh, int *err _U_) { /* This is a netmon file */ wdh->subtype_write = netmon_dump; Index: ethereal/wiretap/netxray.c =================================================================== RCS file: /cvsroot/ethereal/wiretap/netxray.c,v retrieving revision 1.44 diff -u -r1.44 netxray.c --- netxray.c 2002/02/08 10:07:40 1.44 +++ netxray.c 2002/02/14 22:59:32 @@ -340,7 +340,7 @@ /* Returns 0 if we could write the specified encapsulation type, an error indication otherwise. */ -int netxray_dump_can_write_encap(int filetype, int encap) +int netxray_dump_can_write_encap(int filetype _U_, int encap) { /* Per-packet encapsulations aren't supported. */ if (encap == WTAP_ENCAP_PER_PACKET) @@ -354,7 +354,7 @@ /* Returns TRUE on success, FALSE on failure; sets "*err" to an error code on failure */ -gboolean netxray_dump_open_1_1(wtap_dumper *wdh, int *err) +gboolean netxray_dump_open_1_1(wtap_dumper *wdh, int *err _U_) { /* This is a netxray file */ wdh->subtype_write = netxray_dump_1_1; @@ -377,8 +377,10 @@ /* Write a record for a packet to a dump file. Returns TRUE on success, FALSE on failure. */ -static gboolean netxray_dump_1_1(wtap_dumper *wdh, const struct wtap_pkthdr *phdr, - const union wtap_pseudo_header *pseudo_header, const u_char *pd, int *err) +static gboolean netxray_dump_1_1(wtap_dumper *wdh, + const struct wtap_pkthdr *phdr, + const union wtap_pseudo_header *pseudo_header _U_, + const u_char *pd, int *err) { netxray_dump_t *netxray = wdh->dump.netxray; guint32 timestamp; Index: ethereal/wiretap/ngsniffer.c =================================================================== RCS file: /cvsroot/ethereal/wiretap/ngsniffer.c,v retrieving revision 1.71 diff -u -r1.71 ngsniffer.c --- ngsniffer.c 2002/02/08 10:07:40 1.71 +++ ngsniffer.c 2002/02/14 22:59:39 @@ -1050,8 +1050,9 @@ return 0; } -static void set_pseudo_header_frame6(union wtap_pseudo_header *pseudo_header, - struct frame6_rec *frame6) +static void set_pseudo_header_frame6( + union wtap_pseudo_header *pseudo_header _U_, + struct frame6_rec *frame6 _U_) { /* XXX - Once the frame format is divined, something will most likely go here */ } @@ -1095,7 +1096,7 @@ } } -static void free_blob(gpointer data, gpointer user_data) +static void free_blob(gpointer data, gpointer user_data _U_) { g_free(data); } @@ -1133,7 +1134,7 @@ /* Returns 0 if we could write the specified encapsulation type, an error indication otherwise. */ -int ngsniffer_dump_can_write_encap(int filetype, int encap) +int ngsniffer_dump_can_write_encap(int filetype _U_, int encap) { /* Per-packet encapsulations aren't supported. */ if (encap == WTAP_ENCAP_PER_PACKET) Index: ethereal/wiretap/pppdump.c =================================================================== RCS file: /cvsroot/ethereal/wiretap/pppdump.c,v retrieving revision 1.13 diff -u -r1.13 pppdump.c --- pppdump.c 2001/12/17 22:22:42 1.13 +++ pppdump.c 2002/02/14 22:59:42 @@ -566,7 +566,7 @@ } static void -simple_g_free(gpointer data, gpointer junk) +simple_g_free(gpointer data, gpointer dummy _U_) { if (data) g_free(data); Index: ethereal/wiretap/snoop.c =================================================================== RCS file: /cvsroot/ethereal/wiretap/snoop.c,v retrieving revision 1.40 diff -u -r1.40 snoop.c --- snoop.c 2002/02/08 10:07:41 1.40 +++ snoop.c 2002/02/14 22:59:44 @@ -504,7 +504,7 @@ /* Returns 0 if we could write the specified encapsulation type, an error indication otherwise. */ -int snoop_dump_can_write_encap(int filetype, int encap) +int snoop_dump_can_write_encap(int filetype _U_, int encap) { /* Per-packet encapsulations aren't supported. */ if (encap == WTAP_ENCAP_PER_PACKET) @@ -554,8 +554,10 @@ /* Write a record for a packet to a dump file. Returns TRUE on success, FALSE on failure. */ -static gboolean snoop_dump(wtap_dumper *wdh, const struct wtap_pkthdr *phdr, - const union wtap_pseudo_header *pseudo_header, const u_char *pd, int *err) +static gboolean snoop_dump(wtap_dumper *wdh, + const struct wtap_pkthdr *phdr, + const union wtap_pseudo_header *pseudo_header _U_, + const u_char *pd, int *err) { struct snooprec_hdr rec_hdr; size_t nwritten; Index: ethereal/wiretap/toshiba.c =================================================================== RCS file: /cvsroot/ethereal/wiretap/toshiba.c,v retrieving revision 1.20 diff -u -r1.20 toshiba.c --- toshiba.c 2002/02/08 10:07:41 1.20 +++ toshiba.c 2002/02/14 22:59:46 @@ -186,7 +186,7 @@ /* XXX - return -1 on I/O error and actually do something with 'err'. */ -int toshiba_open(wtap *wth, int *err) +int toshiba_open(wtap *wth, int *err _U_) { /* Look for Toshiba header */ if (!toshiba_check_file_type(wth)) { Index: ethereal/wiretap/visual.c =================================================================== RCS file: /cvsroot/ethereal/wiretap/visual.c,v retrieving revision 1.1 diff -u -r1.1 visual.c --- visual.c 2001/12/04 22:28:19 1.1 +++ visual.c 2002/02/14 22:59:49 @@ -220,7 +220,6 @@ int bytes_read; struct visual_pkt_hdr vpkt_hdr; int phdr_size = sizeof(vpkt_hdr); - int rec_offset; time_t secs; guint32 usecs; double t; @@ -376,7 +375,7 @@ /* Check for media types that may be written in Visual file format. Returns 0 if the specified encapsulation type is supported, an error indication otherwise. */ -int visual_dump_can_write_encap(int filetype, int encap) +int visual_dump_can_write_encap(int filetype _U_, int encap) { /* Per-packet encapsulations aren't supported. */ if (encap == WTAP_ENCAP_PER_PACKET) @@ -402,7 +401,7 @@ /* Open a file for writing. Returns TRUE on success, FALSE on failure; sets "*err" to an error code on failure */ -gboolean visual_dump_open(wtap_dumper *wdh, int *err) +gboolean visual_dump_open(wtap_dumper *wdh, int *err _U_) { struct visual_write_info *visual; @@ -564,7 +563,6 @@ struct visual_file_hdr vfile_hdr; const char *magicp; size_t magic_size; - struct tm *tm; /* If the visual structure was never allocated then nothing useful can be done. */ Index: ethereal/wiretap/vms.c =================================================================== RCS file: /cvsroot/ethereal/wiretap/vms.c,v retrieving revision 1.6 diff -u -r1.6 vms.c --- vms.c 2002/02/08 10:07:41 1.6 +++ vms.c 2002/02/14 22:59:51 @@ -155,7 +155,7 @@ /* XXX - return -1 on I/O error and actually do something with 'err'. */ -int vms_open(wtap *wth, int *err) +int vms_open(wtap *wth, int *err _U_) { /* Look for VMS header */ if (!vms_check_file_type(wth)) { @@ -206,7 +206,8 @@ /* Used to read packets in random-access fashion */ static int -vms_seek_read (wtap *wth, long seek_off, union wtap_pseudo_header *pseudo_header, +vms_seek_read (wtap *wth, long seek_off, + union wtap_pseudo_header *pseudo_header _U_, guint8 *pd, int len) { int pkt_len;
- Follow-Ups:
- Re: [Ethereal-dev] gcc warnings about unused variables
- From: Hamish Moffatt
- Re: [Ethereal-dev] gcc warnings about unused variables
- From: Guy Harris
- Re: [Ethereal-dev] gcc warnings about unused variables
- Prev by Date: [Ethereal-dev] OSPF filtering
- Next by Date: [Ethereal-dev] proto.c: line 1115 (proto_tree_add_string): assertion failed: (hfinfo->type == FT_STRING)
- Previous by thread: [Ethereal-dev] OSPF filtering
- Next by thread: Re: [Ethereal-dev] gcc warnings about unused variables
- Index(es):