From Joerg Mayer: get rid of "-Wno-unused" flag in some configure
authorGuy Harris <guy@alum.mit.edu>
Sat, 2 Mar 2002 20:41:08 +0000 (20:41 -0000)
committerGuy Harris <guy@alum.mit.edu>
Sat, 2 Mar 2002 20:41:08 +0000 (20:41 -0000)
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).

svn path=/trunk/; revision=4847

wiretap/ascend-grammar.y
wiretap/configure.in
wiretap/csids.c
wiretap/dbs-etherwatch.c
wiretap/file.c
wiretap/libpcap.c
wiretap/netxray.c
wiretap/ngsniffer.c
wiretap/pppdump.c
wiretap/snoop.c
wiretap/vms.c

index c9dcfca6ed8a45bafc008bc9ab22b2a13ed44e59..75f39981030a764aa4523dc80ce0a86c08e7ffc0 100644 (file)
@@ -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 <gram@alumni.rice.edu>
@@ -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); */
 }
index e3431e5615390f3341411147e3290959823d91ed..86345a3154c3f5bc217451ffb67f080dc7e1f314 100644 (file)
@@ -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"
index 3f1dd461a6965bcf9714fde58da4312c6612c612..3efba8608f920e075fe6b4f3fdf56e1f2d5f8751 100644 (file)
@@ -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 <mlh@io.com>
  * 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)
 {
index 1bd1c9494113dbec0462959e0b615b98893eadca..5f0edc3ad9b89fb52dabc155ac1fbc889d08e9a2 100644 (file)
@@ -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 <mmilgram@arrayinc.com>
@@ -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;
index f981bdd33abbb534ff4af6a9030e8c5146eefea2..07cfb1d2bfe52664a6175423aacd452adaf7e838 100644 (file)
@@ -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 <gram@alumni.rice.edu>
@@ -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);
 
index cdb07aaf362515d3e8057f414af1f6417c24443e..06b2a047b6fdb95cfdaeb81b2c540ff184feb339 100644 (file)
@@ -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 <gram@alumni.rice.edu>
@@ -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;
index 21da9c4e86fc5a78f2480cd1d60797a1f8bfa431..658be15e5aeffd60ab1959f8138bc1a77060b2da 100644 (file)
@@ -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 <gram@alumni.rice.edu>
@@ -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;
index 47fbf730772a8aeaf004ea1eaa1acf783bc31be6..a41d6cccde4c062b609e48643f59e95386975649 100644 (file)
@@ -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 <gram@alumni.rice.edu>
@@ -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);
 }
index 8691c427177c44e50ef1903372887087f498c91c..7768e427462a87e42d3eb87817fe237bae3c2182 100644 (file)
@@ -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 <gram@alumni.rice.edu>
  * 
@@ -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);
index 751bc6c47720a2e41699f2f33dde7d0a3bbbe2ab..124ef543f9b79ee57a59981b67cc55d95ebfd197 100644 (file)
@@ -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 <gram@alumni.rice.edu>
@@ -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;
index 794a2e76dd0d9c37631e8fb96dea1b8aab93da7b..f1e0760bf2923cd7a6cc14d9d4b6677e19c75dd2 100644 (file)
@@ -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 <mmilgram@arrayinc.com>
@@ -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;