From 12a9e1b2d6545626cc280299660d11cfe91e779f Mon Sep 17 00:00:00 2001 From: guy Date: Sat, 2 Mar 2002 20:41:08 +0000 Subject: From Joerg Mayer: get rid of "-Wno-unused" flag in some configure scripts, and check in changes to add _U_ to some unused arguments (some other should perhaps be used, so we leave the _U_ out so that the warnings serve as a reminder to check those). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4847 f5534014-38df-0310-8fa8-9805f1628bb7 --- wiretap/ascend-grammar.y | 5 ++--- wiretap/configure.in | 12 ++++++------ wiretap/csids.c | 4 ++-- wiretap/dbs-etherwatch.c | 4 ++-- wiretap/file.c | 5 +++-- wiretap/libpcap.c | 8 +++++--- wiretap/netxray.c | 8 +++++--- wiretap/ngsniffer.c | 9 +++++---- wiretap/pppdump.c | 4 ++-- wiretap/snoop.c | 8 +++++--- wiretap/vms.c | 5 +++-- 11 files changed, 40 insertions(+), 32 deletions(-) (limited to 'wiretap') diff --git a/wiretap/ascend-grammar.y b/wiretap/ascend-grammar.y index c9dcfca6ed..75f3998103 100644 --- a/wiretap/ascend-grammar.y +++ b/wiretap/ascend-grammar.y @@ -1,7 +1,7 @@ %{ /* ascend-grammar.y * - * $Id: ascend-grammar.y,v 1.23 2001/12/06 08:25:51 guy Exp $ + * $Id: ascend-grammar.y,v 1.24 2002/03/02 20:41:07 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez @@ -409,7 +409,6 @@ parse_ascend(FILE_T fh, void *pd, struct ascend_phdr *phdr, } void -yyerror (char *s) +yyerror (char *s _U_) { - /* fprintf (stderr, "%s\n", s); */ } diff --git a/wiretap/configure.in b/wiretap/configure.in index e3431e5615..86345a3154 100644 --- a/wiretap/configure.in +++ b/wiretap/configure.in @@ -1,4 +1,4 @@ -# $Id: configure.in,v 1.36 2002/02/27 09:42:52 guy Exp $ +# $Id: configure.in,v 1.37 2002/03/02 20:41:07 guy Exp $ dnl dnl Process this file with autoconf 2.13 or later to produce a dnl configure script; 2.12 doesn't generate a "configure" script that @@ -29,16 +29,16 @@ AC_PATH_PROG(LEX, flex) AC_SUBST(FLEX_PATH) # -# If we're running gcc, add '-Wall -W -Wno-unused' to CFLAGS, and add -# '-D_U_="__attribute__((unused))"' as well, for future use when we -# remove '-Wno-unused'. +# If we're running gcc, add '-Wall -W' to CFLAGS, and add +# '-D_U_="__attribute__((unused))"' as well, so we can use _U_ to +# flag unused function arguments and not get warnings about them. # # Otherwise, add '-D_U_=""', so that _U_ used to flag an unused function # argument will compile with non-GCC compilers. # -AC_MSG_CHECKING(to see if we can add '-Wall -W -Wno-unused' to CFLAGS) +AC_MSG_CHECKING(to see if we can add '-Wall -W' to CFLAGS) if test x$GCC != x ; then - CFLAGS="-D_U_=\"__attribute__((unused))\" -Wall -W -Wno-unused $CFLAGS" + CFLAGS="-D_U_=\"__attribute__((unused))\" -Wall -W $CFLAGS" AC_MSG_RESULT(yes) else CFLAGS="-D_U_=\"\" $CFLAGS" diff --git a/wiretap/csids.c b/wiretap/csids.c index 3f1dd461a6..3efba8608f 100644 --- a/wiretap/csids.c +++ b/wiretap/csids.c @@ -1,6 +1,6 @@ /* csids.c * - * $Id: csids.c,v 1.9 2002/02/08 10:07:40 guy Exp $ + * $Id: csids.c,v 1.10 2002/03/02 20:41:07 guy Exp $ * * Copyright (c) 2000 by Mike Hall * Copyright (c) 2000 by Cisco Systems @@ -195,7 +195,7 @@ static gboolean csids_read(wtap *wth, int *err, long *data_offset) 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) { diff --git a/wiretap/dbs-etherwatch.c b/wiretap/dbs-etherwatch.c index 1bd1c94941..5f0edc3ad9 100644 --- a/wiretap/dbs-etherwatch.c +++ b/wiretap/dbs-etherwatch.c @@ -1,6 +1,6 @@ /* dbs-etherwatch.c * - * $Id: dbs-etherwatch.c,v 1.3 2002/02/08 10:07:40 guy Exp $ + * $Id: dbs-etherwatch.c,v 1.4 2002/03/02 20:41:07 guy Exp $ * * Wiretap Library * Copyright (c) 2001 by Marc Milgram @@ -199,7 +199,7 @@ static gboolean dbs_etherwatch_read(wtap *wth, int *err, long *data_offset) /* 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; diff --git a/wiretap/file.c b/wiretap/file.c index f981bdd33a..07cfb1d2bf 100644 --- a/wiretap/file.c +++ b/wiretap/file.c @@ -1,6 +1,6 @@ /* file.c * - * $Id: file.c,v 1.81 2002/02/27 08:57:25 guy Exp $ + * $Id: file.c,v 1.82 2002/03/02 20:41:07 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez @@ -123,7 +123,8 @@ static int (*open_routines[])(wtap *, int *) = { #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); diff --git a/wiretap/libpcap.c b/wiretap/libpcap.c index cdb07aaf36..06b2a047b6 100644 --- a/wiretap/libpcap.c +++ b/wiretap/libpcap.c @@ -1,6 +1,6 @@ /* libpcap.c * - * $Id: libpcap.c,v 1.66 2002/02/27 08:57:25 guy Exp $ + * $Id: libpcap.c,v 1.67 2002/03/02 20:41:07 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez @@ -1060,8 +1060,10 @@ gboolean libpcap_dump_open(wtap_dumper *wdh, int *err) /* 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; diff --git a/wiretap/netxray.c b/wiretap/netxray.c index 21da9c4e86..658be15e5a 100644 --- a/wiretap/netxray.c +++ b/wiretap/netxray.c @@ -1,6 +1,6 @@ /* netxray.c * - * $Id: netxray.c,v 1.45 2002/02/27 08:57:25 guy Exp $ + * $Id: netxray.c,v 1.46 2002/03/02 20:41:07 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez @@ -377,8 +377,10 @@ gboolean netxray_dump_open_1_1(wtap_dumper *wdh, int *err) /* 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; diff --git a/wiretap/ngsniffer.c b/wiretap/ngsniffer.c index 47fbf73077..a41d6cccde 100644 --- a/wiretap/ngsniffer.c +++ b/wiretap/ngsniffer.c @@ -1,6 +1,6 @@ /* ngsniffer.c * - * $Id: ngsniffer.c,v 1.72 2002/02/27 08:57:25 guy Exp $ + * $Id: ngsniffer.c,v 1.73 2002/03/02 20:41:07 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez @@ -1049,8 +1049,9 @@ static int ngsniffer_read_frame6(wtap *wth, gboolean is_random, 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 */ } @@ -1094,7 +1095,7 @@ static void ngsniffer_sequential_close(wtap *wth) } } -static void free_blob(gpointer data, gpointer user_data) +static void free_blob(gpointer data, gpointer user_data _U_) { g_free(data); } diff --git a/wiretap/pppdump.c b/wiretap/pppdump.c index 8691c42717..7768e42746 100644 --- a/wiretap/pppdump.c +++ b/wiretap/pppdump.c @@ -1,6 +1,6 @@ /* pppdump.c * - * $Id: pppdump.c,v 1.13 2001/12/17 22:22:42 guy Exp $ + * $Id: pppdump.c,v 1.14 2002/03/02 20:41:07 guy Exp $ * * Copyright (c) 2000 by Gilbert Ramirez * @@ -566,7 +566,7 @@ pppdump_seek_read (wtap *wth, } static void -simple_g_free(gpointer data, gpointer junk) +simple_g_free(gpointer data, gpointer dummy _U_) { if (data) g_free(data); diff --git a/wiretap/snoop.c b/wiretap/snoop.c index 751bc6c477..124ef543f9 100644 --- a/wiretap/snoop.c +++ b/wiretap/snoop.c @@ -1,6 +1,6 @@ /* snoop.c * - * $Id: snoop.c,v 1.41 2002/02/27 08:57:25 guy Exp $ + * $Id: snoop.c,v 1.42 2002/03/02 20:41:07 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez @@ -554,8 +554,10 @@ gboolean snoop_dump_open(wtap_dumper *wdh, int *err) /* 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; diff --git a/wiretap/vms.c b/wiretap/vms.c index 794a2e76dd..f1e0760bf2 100644 --- a/wiretap/vms.c +++ b/wiretap/vms.c @@ -1,6 +1,6 @@ /* vms.c * - * $Id: vms.c,v 1.6 2002/02/08 10:07:41 guy Exp $ + * $Id: vms.c,v 1.7 2002/03/02 20:41:08 guy Exp $ * * Wiretap Library * Copyright (c) 2001 by Marc Milgram @@ -206,7 +206,8 @@ static gboolean vms_read(wtap *wth, int *err, long *data_offset) /* 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; -- cgit v1.2.3