Fix some warnings/errors of type
authorJoerg Mayer <jmayer@loplof.de>
Mon, 28 Mar 2016 11:37:24 +0000 (13:37 +0200)
committerJörg Mayer <jmayer@loplof.de>
Mon, 28 Mar 2016 11:43:56 +0000 (11:43 +0000)
git/epan/dissectors/packet-a21.c:478:25: error: 'item' was marked unused but was used
      [-Werror,-Wused-but-marked-unused]
        proto_item_append_text(item, "%s", val_to_str_const(event_id, a21_event_vals, "Unknown"));
                               ^
Added manual change id because file-jpeg.c forced the use of commit -n

Change-Id: Iffff53d6253758c8454d9583f0a11f317c8390cb
Reviewed-on: https://code.wireshark.org/review/14666
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
12 files changed:
capinfos.c
captype.c
epan/dissectors/file-elf.c
epan/dissectors/file-jpeg.c
epan/dissectors/file-mp4.c
wiretap/ber.c
wiretap/camins.c
wiretap/file_wrappers.c
wiretap/k12text.l
wiretap/logcat_text.c
wiretap/pcapng.c
wsutil/ws_version_info.c

index 178fa60cde72419bfe72625170a80d9c8b96331a..e75e70e1ecc65818509d85b1bfe24599210d08db 100644 (file)
@@ -1384,7 +1384,12 @@ get_capinfos_compiled_info(GString *str)
 }
 
 static void
-get_capinfos_runtime_info(GString *str _U_)
+get_capinfos_runtime_info(
+#if defined(HAVE_LIBZ) && !defined(_WIN32)
+    GString *str)
+#else
+    GString *str _U_)
+#endif
 {
   /* zlib */
 #if defined(HAVE_LIBZ) && !defined(_WIN32)
index 8b75852992f50188ac1b766c4c301cb9a2cfec7b..1390f0ce06fd3de8b20109978c28d218df598544 100644 (file)
--- a/captype.c
+++ b/captype.c
@@ -104,7 +104,12 @@ get_captype_compiled_info(GString *str)
 }
 
 static void
-get_captype_runtime_info(GString *str _U_)
+get_captype_runtime_info(
+#if defined(HAVE_LIBZ) && !defined(_WIN32)
+    GString *str)
+#else
+    GString *str _U_)
+#endif
 {
   /* zlib */
 #if defined(HAVE_LIBZ) && !defined(_WIN32)
index d45b844aeda754a9c135f77a5eb8a184ee0e8913..c85f1e360fe9be263ae9ff1122f793217b9dc634 100644 (file)
@@ -962,7 +962,7 @@ dissect_eh_frame_hdr(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *segment_
 
 
 static gint
-dissect_eh_frame(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *segment_tree,
+dissect_eh_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *segment_tree,
         gint offset, gint segment_size, gint register_size _U_, guint machine_encoding)
 {
     proto_tree    *cfi_tree = NULL;
index 82af92163b4a1645322d0be31269c5c17d836490..8f419d5a9804ab18d91a0410fd34dcd8ba1d5d18 100644 (file)
@@ -484,7 +484,7 @@ process_sos_header(proto_tree *tree, tvbuff_t *tvb, guint32 len _U_,
  * Process a Comment header (with length).
  */
 static void
-process_comment_header(proto_tree *tree, tvbuff_t *tvb, guint32 len _U_,
+process_comment_header(proto_tree *tree, tvbuff_t *tvb, guint32 len,
         guint16 marker, const char *marker_name)
 {
     proto_item *ti;
index 9ff112c62fab153e50ca01f5402c0dcc574a0a88..e3c2d2744211fdfa966447fc8f1400a361fffa92 100644 (file)
@@ -491,7 +491,7 @@ dissect_mp4_url_body(tvbuff_t *tvb, gint offset, gint len,
 
 static gint
 dissect_mp4_stsd_body(tvbuff_t *tvb, gint offset, gint len,
-        packet_info *pinfo _U_, proto_tree *tree)
+        packet_info *pinfo, proto_tree *tree)
 {
     guint32  entry_cnt, i;
     gint     ret;
index b7467ce3da8e30db3d2b26e2ce2ca267add22fe3..4897447a046df79f50856442a05619de5811cd70 100644 (file)
@@ -85,7 +85,7 @@ static gboolean ber_read(wtap *wth, int *err, gchar **err_info, gint64 *data_off
   return ber_read_file(wth, wth->fh, &wth->phdr, wth->frame_buffer, err, err_info);
 }
 
-static gboolean ber_seek_read(wtap *wth, gint64 seek_off, struct wtap_pkthdr *phdr _U_,
+static gboolean ber_seek_read(wtap *wth, gint64 seek_off, struct wtap_pkthdr *phdr,
                               Buffer *buf, int *err, gchar **err_info)
 {
   /* there is only one packet */
index 49863799dd89c7d79108b04260aa19befecd9578..47a9f88c34e307b0f31cdc9d48e73a46e79032b9 100644 (file)
@@ -296,7 +296,7 @@ camins_seek_read(wtap *wth, gint64 seek_off,
 
 
 
-wtap_open_return_val camins_open(wtap *wth, int *err, gchar **err_info _U_)
+wtap_open_return_val camins_open(wtap *wth, int *err, gchar **err_info)
 {
     guint8  found_start_blocks = 0;
     guint8  count = 0;
index 067be50659ab20b5f983464c1bb001231fb25f23..777d6830143bd5114ab8bd5cb734612ce6b6678f 100644 (file)
@@ -233,7 +233,12 @@ fast_seek_header(FILE_T file, gint64 in_pos, gint64 out_pos,
 }
 
 static void
-fast_seek_reset(FILE_T state _U_)
+fast_seek_reset(
+#ifdef HAVE_LIBZ
+    FILE_T state)
+#else
+    FILE_T state _U_)
+#endif
 {
 #ifdef HAVE_LIBZ
     if (state->compression == ZLIB && state->fast_seek_cur) {
index 7601b942324f041d0479e6d058ccaee2810f8cb6..3ff7ca8610e1108ef6fe15584c24e82d04f9e81c 100644 (file)
@@ -373,7 +373,7 @@ static const struct { int e; const char* s; } encaps[] = {
 };
 
 static gboolean
-k12text_dump(wtap_dumper *wdh _U_, const struct wtap_pkthdr *phdr,
+k12text_dump(wtap_dumper *wdh, const struct wtap_pkthdr *phdr,
             const guint8 *pd, int *err, gchar **err_info _U_) {
 #define K12BUF_SIZE 196808
        char *buf;
index 870121a76eb55e0b47c77c17c3954b46ff0c3d60..551358170f3bf4d003bf4efa6c816c62c995dde1 100644 (file)
@@ -224,7 +224,7 @@ static gboolean logcat_text_read_packet(FILE_T fh, struct wtap_pkthdr *phdr,
 }
 
 static gboolean logcat_text_read(wtap *wth, int *err _U_ , gchar **err_info _U_,
-        gint64 *data_offset _U_) {
+        gint64 *data_offset) {
     *data_offset = file_tell(wth->fh);
 
     return logcat_text_read_packet(wth->fh, &wth->phdr, wth->frame_buffer,
@@ -232,7 +232,7 @@ static gboolean logcat_text_read(wtap *wth, int *err _U_ , gchar **err_info _U_,
 }
 
 static gboolean logcat_text_seek_read(wtap *wth, gint64 seek_off,
-        struct wtap_pkthdr *phdr, Buffer *buf, int *err _U_, gchar **err_info _U_) {
+        struct wtap_pkthdr *phdr, Buffer *buf, int *err, gchar **err_info _U_) {
     if (file_seek(wth->random_fh, seek_off, SEEK_SET, err) == -1)
         return FALSE;
 
index 8729177b0b755031b0c225fee8b9f5842b432971..3ebbfcaf1cbd7ff90b10cb1d8cc28526801c75c1 100644 (file)
@@ -2122,7 +2122,7 @@ pcapng_read_interface_statistics_block(FILE_T fh, pcapng_block_header_t *bh, pca
 }
 
 static gboolean
-pcapng_read_sysdig_event_block(FILE_T fh, pcapng_block_header_t *bh, pcapng_t *pn _U_, wtapng_block_t *wblock, int *err, gchar **err_info)
+pcapng_read_sysdig_event_block(FILE_T fh, pcapng_block_header_t *bh, pcapng_t *pn, wtapng_block_t *wblock, int *err, gchar **err_info)
 {
     unsigned block_read;
     guint32 block_total_length;
@@ -2213,7 +2213,16 @@ pcapng_read_sysdig_event_block(FILE_T fh, pcapng_block_header_t *bh, pcapng_t *p
 }
 
 static gboolean
-pcapng_read_unknown_block(FILE_T fh, pcapng_block_header_t *bh, pcapng_t *pn _U_, wtapng_block_t *wblock _U_, int *err, gchar **err_info)
+pcapng_read_unknown_block(FILE_T fh, pcapng_block_header_t *bh,
+#
+#ifdef HAVE_PLUGINS
+    pcapng_t *pn,
+    wtapng_block_t *wblock,
+#else
+    pcapng_t *pn _U_,
+    wtapng_block_t *wblock _U_,
+#endif
+    int *err, gchar **err_info)
 {
     guint32 block_read;
     guint32 block_total_length;
index 902959889297729866899eb135a768ec4977ae3e..8298e8226eace2aa4c67c6b7e2b2d16bad3a68e9 100644 (file)
@@ -126,7 +126,7 @@ get_compiled_version_info(void (*prepend_info)(GString *),
  * Get the CPU info, and append it to the GString
  */
 static void
-get_cpu_info(GString *str _U_)
+get_cpu_info(GString *str)
 {
        guint32 CPUInfo[4];
        char CPUBrandString[0x40];