Fix gcc 4.6 "set but not used [-Wunused-but-set-variable]" warnings.
authorwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 19 Jun 2011 18:47:35 +0000 (18:47 +0000)
committerwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 19 Jun 2011 18:47:35 +0000 (18:47 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37716 f5534014-38df-0310-8fa8-9805f1628bb7

36 files changed:
epan/dissectors/packet-dcm.c
epan/dissectors/packet-dec-bpdu.c
epan/dissectors/packet-dplay.c
epan/dissectors/packet-dtls.c
epan/dissectors/packet-eap.c
epan/dissectors/packet-fcels.c
epan/dissectors/packet-fcp.c
epan/dissectors/packet-fcswils.c
epan/dissectors/packet-fix.c
epan/dissectors/packet-gsm_a_gm.c
epan/dissectors/packet-hsrp.c
epan/dissectors/packet-imf.c
epan/dissectors/packet-ipmi-picmg.c
epan/dissectors/packet-ipmi-storage.c
epan/dissectors/packet-ipv6.c
epan/dissectors/packet-isakmp.c
epan/dissectors/packet-isup.c
epan/dissectors/packet-lapd.c
epan/dissectors/packet-mrp-mmrp.c
epan/dissectors/packet-nbns.c
epan/dissectors/packet-pana.c
epan/dissectors/packet-pcep.c
epan/dissectors/packet-quakeworld.c
epan/dissectors/packet-radiotap.c
epan/dissectors/packet-rlc.c
epan/dissectors/packet-rmt-norm.c
epan/dissectors/packet-sccpmg.c
epan/dissectors/packet-sdp.c
epan/dissectors/packet-sebek.c
epan/dissectors/packet-skinny.c
epan/dissectors/packet-stat.c
epan/dissectors/packet-synphasor.c
epan/dissectors/packet-tn3270.c
epan/dissectors/packet-tn5250.c
epan/dissectors/packet-uma.c
epan/dissectors/packet-x11.c

index d629fe8df6b7f699bf1223c4169b0dfbd7b0668e..fe7d4277d89415dbaa9f764caecd00f619c40003 100644 (file)
@@ -6121,10 +6121,8 @@ dissect_dcm_pdv_body(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
 
     gchar *tag_value = NULL;
     gboolean dummy = FALSE;
-    guint32 startpos = 0;
     guint32 endpos = 0;
 
-    startpos = offset;
     endpos = offset + pdv_body_len;
 
     if (pdv->syntax == DCM_UNK) {
index 6fbbd6a1f1192b63fa6c4600918d5fbcb5cdf5fb..b54b341033bf173868718d155d3be88c1579ece6 100644 (file)
@@ -108,7 +108,6 @@ static const char cont_sep[] = ", ";
 static void
 dissect_dec_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 {
-      guint8  protocol_version;
       guint8  bpdu_type;
       guint8  flags;
       proto_tree *bpdu_tree;
@@ -134,8 +133,6 @@ dissect_dec_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                                FALSE);
            bpdu_tree = proto_item_add_subtree(ti, ett_dec_bpdu);
 
-           protocol_version = tvb_get_guint8(tvb, BPDU_VERSION);
-
            proto_tree_add_item(bpdu_tree, hf_dec_bpdu_proto_id, tvb,
                                BPDU_DEC_CODE, 1, FALSE);
 
index 08f402c3b3125f388f20a5e88a374e3def586210..902a624cdca07d59fbbdaf24482869aafbfda88d 100644 (file)
@@ -466,12 +466,10 @@ static gint dissect_sockaddr_in(proto_tree *tree, tvbuff_t *tvb, gint offset)
 
 static gint dissect_session_desc(proto_tree *tree, tvbuff_t *tvb, gint offset)
 {
-    gint data_len;
     guint32 flags;
     proto_item *flags_item = NULL;
     proto_tree *flags_tree = NULL;
 
-    data_len = tvb_get_letohl(tvb, offset);
     flags = tvb_get_letohl(tvb, offset+4);
 
     proto_tree_add_item(tree, hf_dplay_sess_desc_length, tvb, offset, 4, TRUE); offset += 4;
@@ -1013,11 +1011,9 @@ static void dissect_dplay(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     guint16 message_type;
     guint16 second_message_type = G_MAXUINT16;
     guint16 proto_version;
-    guint16 packet_size;
     guint32 dplay_id;
     guint8 play_id[] = {'p','l','a','y'};
 
-    packet_size = tvb_get_letohs(tvb, 0);
     dplay_id = tvb_get_letohl(tvb, 20);
     message_type = tvb_get_letohs(tvb, 24);
     proto_version = tvb_get_letohs(tvb, 26);
index 8645783f2ad362720b3f7999037f90ed26e37a13..dad0c8dbb750d075f6bc50510b0ff50bff7306bd 100644 (file)
@@ -611,12 +611,10 @@ dissect_dtls_record(tvbuff_t *tvb, packet_info *pinfo,
   guint8 next_byte;
   proto_tree *ti;
   proto_tree *dtls_record_tree;
-  guint32 available_bytes;
   SslAssociation* association;
   SslDataInfo *appl_data;
   ti              = NULL;
   dtls_record_tree = NULL;
-  available_bytes = tvb_length_remaining(tvb, offset);
 
   /*
    * Get the record layer fields of interest
index 23a5435c0069326360061efd29920c185b3b90c8..0bd7f8114d64e0265b73c26ab4afdd9ef3f06431 100644 (file)
@@ -619,7 +619,6 @@ static int
 dissect_eap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 {
   guint8      eap_code;
-  guint8      eap_id;
   guint16     eap_len;
   guint8      eap_type;
   gint        len;
@@ -706,8 +705,6 @@ dissect_eap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   if (eap_code == EAP_FAILURE)
     conversation_state->leap_state = -1;
 
-  eap_id = tvb_get_guint8(tvb, 1);
-
   eap_len = tvb_get_ntohs(tvb, 2);
   len = eap_len;
 
index cb75eea6f79cf958eef185d2912aa9cd6fea5be5..76592032faa8f71b22ff9fb571b05bf8e316e2c6 100644 (file)
@@ -1863,7 +1863,7 @@ dissect_fcels_rnid (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
 {
     /* Set up structures needed to add the protocol subtree and manage it */
     int offset = 0;
-    int clen, slen;
+    int clen;
     proto_tree *rnid_tree;
 
     if (tree) {
@@ -1881,7 +1881,6 @@ dissect_fcels_rnid (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
             clen = tvb_get_guint8 (tvb, offset+5);
             proto_tree_add_text (rnid_tree, tvb, offset+5, 1,
                                  "Common Identification Data Length: %u", clen);
-            slen = tvb_get_guint8 (tvb, offset+7);
             proto_tree_add_item (rnid_tree, hf_fcels_spidlen, tvb, offset+7,
                                  1, FALSE);
             if (clen) {
index b0270cfbf6dff5df3167fb4dee7f19b555c7cbbf..2aa2a1507deac366c5a2de9cf3a4910f2dddbca9 100644 (file)
@@ -387,8 +387,7 @@ static void
 dissect_fcp_cmnd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, proto_tree *tree, conversation_t *conversation, fc_hdr *fchdr, fcp_conv_data_t *fcp_conv_data)
 {
     int offset = 0;
-    int len,
-        add_len = 0;
+    int add_len = 0;
     guint8 flags, rwflags, lun0;
     guint16 lun=0xffff;
     tvbuff_t *cdb_tvb;
@@ -401,11 +400,6 @@ dissect_fcp_cmnd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, pro
     if (flags) {
         add_len = tvb_get_guint8 (tvb, offset+11) & 0x7C;
         add_len = add_len >> 2;
-
-        len = FCP_DEF_CMND_LEN + add_len;
-    }
-    else {
-        len = FCP_DEF_CMND_LEN;
     }
 
     hidden_item = proto_tree_add_uint(tree, hf_fcp_type, tvb, offset, 0, 0);
index 0ddb4c94d1a530964465b16fe2e98e18ca260a77..98380ec8c0f5309d847549a83f0ee42e5d54c524 100644 (file)
@@ -1156,7 +1156,6 @@ dissect_swils_rscn (tvbuff_t *tvb, proto_tree *rscn_tree, guint8 isreq)
     /* Set up structures needed to add the protocol subtree and manage it */
     int offset = 0;
     proto_tree *dev_tree;
-    int addrfmt, evtype;
     int numrec, i;
     proto_item *subti;
 
@@ -1164,10 +1163,6 @@ dissect_swils_rscn (tvbuff_t *tvb, proto_tree *rscn_tree, guint8 isreq)
         if (!isreq)
             return;
 
-        evtype = tvb_get_guint8 (tvb, offset+4);
-        addrfmt = evtype & 0x0F;
-        evtype = evtype >> 4;
-
         proto_tree_add_item (rscn_tree, hf_swils_rscn_evtype, tvb, offset+4,
                              1, 0);
         proto_tree_add_item (rscn_tree, hf_swils_rscn_addrfmt, tvb, offset+4,
index e645e61d98e69a6528f8d20e156265a822c9c7bc..890b32939c57f268397cda766f43fb89bdfd2db0 100644 (file)
@@ -235,7 +235,6 @@ dissect_fix_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     char *value;
     char *tag_str;
     fix_parameter *tag;
-    int check_sum = 0;
 
     /* Make entries in Protocol column and Info column on summary display */
     col_set_str(pinfo->cinfo, COL_PROTOCOL, "FIX");
@@ -355,7 +354,6 @@ dissect_fix_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                     for (j = 0; j < field_offset; j++, data++) {
                          sum += *data;
                     }
-                    check_sum = 1;
                     sum_ok = (atoi(value) == sum);
                     if (sum_ok) {
                         item = proto_tree_add_string_format_value(fix_tree, fix_fields[i].hf_id, tvb, field_offset, tag->field_len,
index ed8f516239a604c25f37699f0e51d5bb50164038..e0c0f0927de124df2abadc3a2c8e533a184c934f 100644 (file)
@@ -3794,11 +3794,9 @@ static guint16
 de_sm_pdp_addr(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
-       guint   curr_len;
        const gchar     *str;
        guchar    pdp_type_org, pdp_type_num;
 
-       curr_len = len;
        curr_offset = offset;
 
        proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset << 3), 4, ENC_BIG_ENDIAN);
index 484173270a0a20c36e384e3d212c67c7565e2892..f32062768ecb5b09057ee072e689b4f40221a38f 100644 (file)
@@ -454,7 +454,7 @@ dissect_hsrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                        offset2 = offset;
                         if (type == 1 && len == 40) {
                                 /* Group State TLV */
-                                guint8 version,opcode, state = 0, ipver;
+                                guint8 opcode, state = 0, ipver;
                                 guint32 hellotime, holdtime;
                                 proto_tree *group_state_tlv;
 
@@ -464,7 +464,6 @@ dissect_hsrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                                 }
                                offset+=2;
 
-                                version = tvb_get_guint8(tvb, offset);
                                 opcode = tvb_get_guint8(tvb, offset+1);
                                 if (check_col(pinfo->cinfo, COL_INFO)) {
                                         col_add_fstr(pinfo->cinfo, COL_INFO, "%s",
index f784d9940c717ac9fe143b2722e11056c071bd39..0cc3532937f455e1147856578bc6fe01fbc1f41c 100644 (file)
@@ -481,7 +481,6 @@ static void dissect_imf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   gint   max_length;
   guint8 *key;
   gboolean last_field = FALSE;
-  gboolean dissected = FALSE;
   tvbuff_t *next_tvb;
   struct imf_field *f_info;
 
@@ -608,7 +607,7 @@ static void dissect_imf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
     next_tvb = tvb_new_subset_remaining(tvb, end_offset);
 
-    dissected = dissector_try_string(media_type_dissector_table, content_type_str, next_tvb, pinfo, tree);
+    dissector_try_string(media_type_dissector_table, content_type_str, next_tvb, pinfo, tree);
 
     pinfo->private_data = pd_save;
   } else {
index 301c825a78b3b39b7c43fd106fc07eb7162482f9..418fe811df007b591cb355bd88aec14136e92553 100644 (file)
@@ -532,9 +532,6 @@ static const struct true_false_string tfs_36_fail_unknown = {
 static void
 rs00(tvbuff_t *tvb, proto_tree *tree)
 {
-       guint8 v;
-
-       v = tvb_get_guint8(tvb, 0);
        proto_tree_add_item(tree, hf_ipmi_picmg_00_version, tvb, 0, 1, TRUE);
        proto_tree_add_item(tree, hf_ipmi_picmg_00_max_fruid, tvb, 1, 1, TRUE);
        proto_tree_add_item(tree, hf_ipmi_picmg_00_ipmc_fruid, tvb, 2, 1, TRUE);
index 6decc1340e9eb0c52d89b276ef0be9723b9f8503..139b466483c9fbac9936c7d751400f497a3cd4b1 100644 (file)
@@ -310,9 +310,7 @@ rs20(tvbuff_t *tvb, proto_tree *tree)
        static const int *ops[] = { &hf_ipmi_stor_20_op_overflow, &hf_ipmi_stor_20_op_update,
                &hf_ipmi_stor_20_op_delete, &hf_ipmi_stor_20_op_partial_add, &hf_ipmi_stor_20_op_reserve,
                &hf_ipmi_stor_20_op_allocinfo, NULL };
-       guint8 v;
 
-       v = tvb_get_guint8(tvb, 0);
        proto_tree_add_item(tree, hf_ipmi_stor_20_sdr_version, tvb, 0, 1, TRUE);
        proto_tree_add_item(tree, hf_ipmi_stor_20_rec_count, tvb, 1, 2, TRUE);
        proto_tree_add_item(tree, hf_ipmi_stor_20_free_space, tvb, 3, 2, TRUE);
@@ -480,9 +478,7 @@ rs40(tvbuff_t *tvb, proto_tree *tree)
 {
        static const int *ops[] = { &hf_ipmi_stor_40_op_overflow, &hf_ipmi_stor_40_op_delete,
                &hf_ipmi_stor_40_op_partial_add, &hf_ipmi_stor_40_op_reserve, &hf_ipmi_stor_40_op_allocinfo, NULL };
-       guint8 v;
 
-       v = tvb_get_guint8(tvb, 0);
        proto_tree_add_item(tree, hf_ipmi_stor_40_sel_version, tvb, 0, 1, TRUE);
        proto_tree_add_item(tree, hf_ipmi_stor_40_entries, tvb, 1, 2, TRUE);
        proto_tree_add_item(tree, hf_ipmi_stor_40_free_space, tvb, 3, 2, TRUE);
index 697ee0f5f03367af11e77b23556e7b4efbf3cf3b..2442a8e1468b4d53497c108c432a8308b105ab0d 100644 (file)
@@ -1036,15 +1036,12 @@ dissect_shimopts(tvbuff_t *tvb, int offset, proto_tree *tree, packet_info *pinfo
     gint padding;
     proto_tree *opt_tree;
     proto_item *ti;
-    guint8 tmp[2];
     const gchar *ctype;
 
 
     p = offset;
 
-    tmp[0] = tvb_get_guint8(tvb, p++);
-    tmp[1] = tvb_get_guint8(tvb, p++);
-    p += 2;
+    p += 4;
 
     len = tvb_get_ntohs(tvb, offset+2);
     padding = 7 - ((len + 3) % 8);
index 8d02b9b5ee1438d60d8b9a5b3f5836a9d8315a79..f8a8b7e4a348595f0e08757d5cf2ca2c9854cb69 100644 (file)
@@ -4446,7 +4446,7 @@ dissect_enc(tvbuff_t *tvb,
 {
 #ifdef HAVE_LIBGCRYPT
   ikev2_decrypt_data_t *key_info = NULL;
-  gint iv_len, encr_data_len, icd_len, encr_key_len, decr_data_len, md_len;
+  gint iv_len, encr_data_len, icd_len, decr_data_len, md_len;
   guint8 pad_len;
   guchar *iv = NULL, *encr_data = NULL, *decr_data = NULL, *entire_message = NULL, *md = NULL;
   gcry_cipher_hd_t cipher_hd;
@@ -4459,7 +4459,6 @@ dissect_enc(tvbuff_t *tvb,
 
   if (pinfo->private_data) {
     key_info = (ikev2_decrypt_data_t*)(pinfo->private_data);
-    encr_key_len = key_info->encr_spec->key_len;
     iv_len = key_info->encr_spec->iv_len;
     icd_len = key_info->auth_spec->trunc_len;
     encr_data_len = length - iv_len - icd_len;
index 4e92181fa026dd5bd37f534587fbc74e63b07b08..8ebd08be6424171f7ce9673aa919f7f7577a6ddd 100644 (file)
@@ -3613,7 +3613,6 @@ static void
 dissect_isup_application_transport_parameter(tvbuff_t *parameter_tvb, packet_info *pinfo, proto_tree *parameter_tree, proto_item *parameter_item)
 {
 
-  guint8 application_transport_instruction_ind;
   guint8 si_and_apm_seg_ind;
   guint8 apm_Segmentation_local_ref = 0;
   guint16 aci16;
@@ -3647,7 +3646,6 @@ dissect_isup_application_transport_parameter(tvbuff_t *parameter_tvb, packet_inf
 
   /* Octet 2 */
   proto_tree_add_text(parameter_tree, parameter_tvb, offset, -1, "Application transport instruction indicators: ");
-  application_transport_instruction_ind = tvb_get_guint8(parameter_tvb, offset);
   proto_tree_add_item( parameter_tree, hf_isup_extension_ind, parameter_tvb, offset, 1, FALSE );
   proto_tree_add_item( parameter_tree, hf_isup_app_Send_notification_ind, parameter_tvb, offset, 1, FALSE );
   proto_tree_add_item( parameter_tree, hf_isup_app_Release_call_ind, parameter_tvb, offset, 1, FALSE );
index 74acc1a98c50e74b0f0dd36badd50790209d69d4..9453808d6f3748f3c89f3bbaf4efcd98f6202f7f 100644 (file)
@@ -207,7 +207,7 @@ dissect_lapd_bitstream(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        gboolean        bit;
        guint8          i, ones = 0, data[MAX_LAPD_PACKET_LEN];
        int             data_len = 0;
-       guint           offset = 0, last_packet_end_offset = 0, available;
+       guint           offset = 0, available;
        guint8          *buff;
        tvbuff_t        *new_tvb;
 
@@ -280,7 +280,6 @@ dissect_lapd_bitstream(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                                        tvb_set_free_cb(new_tvb, g_free);
                                        add_new_data_source(pinfo, new_tvb, "Decoded LAPD bitstream");
                                        dissect_lapd(new_tvb, pinfo, tree);
-                                       last_packet_end_offset = offset -1;
                                        data_len = 0;
                                        state = FLAGS;
                                        bit_offset++;
index e1749bf0d6a9b198aea324b6c95b32bb5214d3f2..bf0aa55387247bc2e9bae951a477ebcb1b679c75 100644 (file)
@@ -220,7 +220,7 @@ static void
 dissect_mmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 {
     /* Set up structures needed to add the protocol subtrees and manage them */
-    proto_item *ti, *msg_ti, *attr_list_ti, *vect_attr_ti, *first_value_ti;
+    proto_item *ti, *msg_ti, *attr_list_ti, *vect_attr_ti;
     proto_tree *mmrp_tree, *msg_tree, *attr_list_tree, *vect_attr_tree;
 
     /* Make entries in Protocol column and Info column on summary display */
@@ -311,9 +311,9 @@ dissect_mmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
                 if (attribute_type == MMRP_ATTRIBUTE_TYPE_MAC) {
                     /* MMRP FirstValue is a Mac Adress*/
-                    first_value_ti = proto_tree_add_item(vect_attr_tree, hf_mmrp_first_value, tvb,
-                                                         MMRP_FIRST_VALUE_GROUP_OFFSET + msg_offset + vect_offset,
-                                                         attribute_length, ENC_NA);
+                    proto_tree_add_item(vect_attr_tree, hf_mmrp_first_value, tvb,
+                                        MMRP_FIRST_VALUE_GROUP_OFFSET + msg_offset + vect_offset,
+                                        attribute_length, ENC_NA);
                     /* Decode three packed events. */
                     offset = dissect_mmrp_three_packed_event(vect_attr_tree, tvb,
                                                              MMRP_MAC_THREE_PACKED_OFFSET + msg_offset + vect_offset,
@@ -322,9 +322,9 @@ dissect_mmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                 }
                 else if (attribute_type == MMRP_ATTRIBUTE_TYPE_SERVICE) {
                     /* MMRP Service Requierment*/
-                    first_value_ti = proto_tree_add_item(vect_attr_tree, hf_mmrp_first_value, tvb,
-                                                         MMRP_FIRST_VALUE_GROUP_OFFSET + msg_offset + vect_offset,
-                                                         attribute_length, ENC_NA);
+                    proto_tree_add_item(vect_attr_tree, hf_mmrp_first_value, tvb,
+                                        MMRP_FIRST_VALUE_GROUP_OFFSET + msg_offset + vect_offset,
+                                        attribute_length, ENC_NA);
                     offset = dissect_mmrp_three_packed_event(vect_attr_tree, tvb,
                                                              MMRP_MAC_THREE_PACKED_OFFSET + msg_offset + vect_offset,
                                                              number_of_values);
index 9a779e2329bec464fb5a80f6c94f3cc9b1100c67..fb27ba07ed036d608897af6d60125fd2204d0190 100644 (file)
@@ -1037,7 +1037,7 @@ dissect_nbns(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        column_info             *cinfo;
        proto_tree              *nbns_tree = NULL;
        proto_item              *ti;
-       guint16                 id, flags, opcode, rcode, quest, ans, auth, add;
+       guint16                 id, flags, opcode, quest, ans, auth, add;
        int                     cur_off;
 
        nbns_data_offset = offset;
@@ -1049,7 +1049,6 @@ dissect_nbns(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        id    = tvb_get_ntohs(tvb, offset + NBNS_ID);
        flags = tvb_get_ntohs(tvb, offset + NBNS_FLAGS);
        opcode = (guint16) ((flags & F_OPCODE) >> OPCODE_SHIFT);
-       rcode  = (guint16)  (flags & F_RCODE);
 
        if (check_col(pinfo->cinfo, COL_INFO)) {
                col_add_fstr(pinfo->cinfo, COL_INFO, "%s%s",
index 747bcc01a893c1f19a1bc0bcfb7200c0262d77d7..0f9f23baba84f2e94ed6f1a0e7c6798ce50c50a8 100644 (file)
@@ -484,7 +484,6 @@ dissect_pana_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        guint16            msg_type;
        guint32            msg_length;
        guint32            avp_length;
-       guint32            session_id;
        guint32            seq_num;
        conversation_t     *conversation;
        pana_conv_info_t   *pana_info;
@@ -498,7 +497,6 @@ dissect_pana_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        msg_length = tvb_get_ntohs(tvb, 2);
        flags      = tvb_get_ntohs(tvb, 4);
        msg_type   = tvb_get_ntohs(tvb, 6);
-       session_id = tvb_get_ntohl(tvb, 8);
        seq_num    = tvb_get_ntohl(tvb, 12);
        avp_length = msg_length - 16;
 
index b4738ea32a76d20f0b1a6c1a29d90f3fef72f750..ec2e7b682b5364f7685b93c12b53b2c6b873fce6 100644 (file)
@@ -949,7 +949,6 @@ dissect_subobj_autonomous_sys_num(proto_tree *pcep_subobj_tree, tvbuff_t *tvb, i
        guint16 AS_number;
        guint8 reserved;
        guint8 attribute;
-       guint16 op_AS_nu_high_oct;
 
        int l;
        l = (l_and_or_type& Mask_L)>>7;
@@ -957,7 +956,6 @@ dissect_subobj_autonomous_sys_num(proto_tree *pcep_subobj_tree, tvbuff_t *tvb, i
        if(obj_class == PCEP_XRO_OBJ){
                reserved = tvb_get_guint8(tvb, offset+2);
                attribute = tvb_get_guint8(tvb, offset+3);
-               op_AS_nu_high_oct = tvb_get_ntohs(tvb, offset+4);
                AS_number = tvb_get_ntohs(tvb, offset+6);
 
                ti = proto_tree_add_item(pcep_subobj_tree, pcep_filter[PCEPF_SUBOBJ_AUTONOMOUS_SYS_NUM], tvb, offset, length, FALSE);
index aa705d058575c4930f2c777c7d29571a5339b3a6..b25aa8933034728095e5558ef9ce44a3b26287e2 100644 (file)
@@ -203,8 +203,6 @@ Cmd_TokenizeString(char* text)
 {
        int i;
        int start;
-       int length;
-
 
        /* clear the args from the last string */
        for (i=0 ; i<cmd_argc ; i++)
@@ -221,8 +219,6 @@ Cmd_TokenizeString(char* text)
                        start++;
                }
 
-               length = 0;
-
                if (*text == '\n') {
                        /* a newline seperates commands in the buffer */
                        text++;
index 57252213b9ada30abc9acacc559d79e0d98ae4c1..6a7f9e4cdbb4414ca6c1c1e201339571952ba210 100644 (file)
@@ -1858,12 +1858,10 @@ dissect_radiotap(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
 
                        if (tree) {
                                int channel;
-                               guint8 maxpower;
 
                                flags = tvb_get_letohl(tvb, offset);
                                freq = tvb_get_letohs(tvb, offset + 4);
                                channel = tvb_get_guint8(tvb, offset + 6);
-                               maxpower = tvb_get_guint8(tvb, offset + 7);
                                proto_tree_add_uint(radiotap_tree,
                                                    hf_radiotap_xchannel,
                                                    tvb, offset + 6, 1,
index 79322d26bbdcce96bbefeaed34bad3c42c3dab44..fa5f32dace3b54f1e4f9f341480ba2d4929ac894 100644 (file)
@@ -1123,7 +1123,7 @@ static void dissect_rlc_um(enum channel_type channel, tvbuff_t *tvb, packet_info
        fp_info *fpinf;
        rlc_info *rlcinf;
        guint32 orig_num;
-       guint8 seq, ext;
+       guint8 seq;
        guint8 next_byte, offs = 0;
        gint16 pos, num_li = 0;
        gboolean is_truncated, li_is_on_2_bytes;
@@ -1131,7 +1131,6 @@ static void dissect_rlc_um(enum channel_type channel, tvbuff_t *tvb, packet_info
 
        next_byte = tvb_get_guint8(tvb, offs++);
        seq = next_byte >> 1;
-       ext = next_byte & 0x01;
 
        /* show sequence number and extension bit */
        if (tree) {
index 093e7fef56af5128eaa1a861841799b72e65037d..064582984667103f1faa63cd4dc64de6f7565650 100644 (file)
@@ -310,14 +310,12 @@ static void dissect_norm_data(struct _norm *norm, proto_tree *tree,
 static void dissect_norm_info(struct _norm *norm, proto_tree *tree,
        tvbuff_t *tvb, guint offset, packet_info *pinfo _U_)
 {
-       guint8 flags;
        proto_item *ti;
        proto_tree *flag_tree;
 
        offset = dissect_grrtetc(tree, tvb, offset);
 
        ti = proto_tree_add_item(tree, hf.flags, tvb, offset, 1, FALSE);
-       flags = tvb_get_guint8(tvb, offset);
        flag_tree = proto_item_add_subtree(ti, ett.flags);
        proto_tree_add_item(flag_tree, hf.flag.repair, tvb, offset, 1, FALSE);
        proto_tree_add_item(flag_tree, hf.flag.explicit, tvb, offset, 1, FALSE);
index 245dd2f305997d1ecf586642b9f81b1631380dde..374ae45e4dadada92c147161ddb85f2463d45ee7 100644 (file)
@@ -209,11 +209,9 @@ static void
 dissect_sccpmg_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccpmg_tree)
 {
        guint8 message_type;
-       guint8 offset = 0;
 
        /* Extract the message type;  all other processing is based on this */
        message_type   = tvb_get_guint8(tvb, SCCPMG_MESSAGE_TYPE_OFFSET);
-       offset = SCCPMG_MESSAGE_TYPE_LENGTH;
 
        if (check_col(pinfo->cinfo, COL_INFO))
                col_add_fstr(pinfo->cinfo, COL_INFO, "%s ", val_to_str(message_type, sccpmg_message_type_acro_values, "Unknown"));
index 14a579a40052cd59b6bf3a33e862b4eed5aaf580..ce4620e148a916991123faaf00c89c53d5c7749d 100644 (file)
@@ -1490,7 +1490,6 @@ static void dissect_sdp_media_attribute(tvbuff_t *tvb, packet_info *pinfo, proto
   proto_item *fmtp_item, *media_format_item;
   proto_tree *fmtp_tree;
   gint offset, next_offset, tokenlen, n, colon_offset;
-  gint start_offset;
   /*??guint8 *field_name;*/
   guint8 *payload_type;
   guint8 *attribute_value;
@@ -1562,7 +1561,6 @@ static void dissect_sdp_media_attribute(tvbuff_t *tvb, packet_info *pinfo, proto
 
     tokenlen = next_offset - offset;
 
-    start_offset = offset;
     proto_tree_add_item(sdp_media_attribute_tree, hf_media_encoding_name, tvb,
                         offset, tokenlen, FALSE);
 
index 96f1ec73bc488d85c3c491f362786ec418b1b2df..d75e428304aee8147d62cd572d6d56b8318a6197 100644 (file)
@@ -124,7 +124,6 @@ dissect_sebek(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        proto_tree      *sebek_tree;
        proto_item      *ti;
        int offset = 0;
-       int datalen = 0;
        nstime_t ts;
        int sebek_ver = 0;
        int sebek_type = 0;
@@ -202,7 +201,6 @@ dissect_sebek(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                                proto_tree_add_item(sebek_tree, hf_sebek_cmd, tvb, offset, 12, FALSE);
                                offset += 12;
 
-                               datalen = tvb_get_letohl(tvb, offset);
                                proto_tree_add_item(sebek_tree, hf_sebek_len, tvb, offset, 4, FALSE);
                                offset += 4;
 
@@ -246,7 +244,6 @@ dissect_sebek(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                                proto_tree_add_item(sebek_tree, hf_sebek_cmd, tvb, offset, 12, FALSE);
                                offset += 12;
 
-                                datalen = tvb_get_ntohl(tvb, offset);
                                proto_tree_add_item(sebek_tree, hf_sebek_len, tvb, offset, 4, FALSE);
                                offset += 4;
 
index 1c4af5bc4706e16f7013d779663cdecb4c40af5e..b6eb0e25c23b2aa547f6dc8b2063aa3644de32dc 100644 (file)
@@ -1259,8 +1259,7 @@ dissect_skinny_xml(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, const gi
   next_tvb = tvb_new_subset(tvb, start, length, -1);
   handle = dissector_get_string_handle(media_type_dissector_table, "text/xml");
   if (handle != NULL) {
-    gboolean dissected;
-    dissected = call_dissector(handle, next_tvb, pinfo, subtree);
+    call_dissector(handle, next_tvb, pinfo, subtree);
    }
 }
 
index f5a0f74e408f77640d99d9ab131efc72ada86c53..a6efc5a58b888e075be1b44f6982c8e612eba4b3 100644 (file)
@@ -122,7 +122,6 @@ dissect_stat_stat_res(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_t
        proto_item* sub_item = NULL;
        proto_tree* sub_tree = NULL;
        gint32 res;
-       gint32 state;
 
        if (tree) {
                sub_item = proto_tree_add_item(tree, hf_stat_stat_res, tvb,
@@ -135,7 +134,6 @@ dissect_stat_stat_res(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_t
        offset = dissect_rpc_uint32(tvb,sub_tree,hf_stat_stat_res_res,offset);
 
        if (res==STAT_SUCC) {
-               state = tvb_get_ntohl(tvb, offset);
                offset = dissect_rpc_uint32(tvb,sub_tree,hf_stat_stat_res_state,offset);
        } else {
                offset += 4;
index 4bc911db808f59a7c2f22edd39cbf6ac0f11d147..7e22d2aa05b6ebc222f9b07735db5fa0d32e7e3a 100644 (file)
@@ -650,7 +650,7 @@ static gint dissect_header(tvbuff_t *tvb, proto_tree *tree)
        proto_item *temp_item;
 
        gint    offset = 0;
-       guint16 framesize, idcode;
+       guint16 framesize;
 
        /* SYNC and flags */
        temp_item = proto_tree_add_item(tree, hf_sync, tvb, offset, 2, FALSE);
@@ -665,7 +665,7 @@ static gint dissect_header(tvbuff_t *tvb, proto_tree *tree)
 
        /* IDCODE */
        proto_tree_add_item(tree, hf_idcode, tvb, offset, 2, FALSE);
-       idcode = tvb_get_ntohs(tvb, offset); offset += 2;
+       offset += 2;
 
        /* SOC */
        {
index 43182ce78e5154c39a36edd2466e27a67daacf17..a3af20b553a218f55035bc7b620b6ca226de52e1 100644 (file)
@@ -4997,7 +4997,6 @@ dissect_tn3270(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   proto_tree   *tn3270_tree;
   proto_item   *ti;
   gint         offset = 0;
-  gint         tn3270_cmd = 0;
   conversation_t *conversation;
   tn3270_conv_info_t *tn3270_info = NULL;
 
@@ -5026,7 +5025,6 @@ dissect_tn3270(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
         offset += dissect_tn3270e_header(tn3270_tree, tvb, offset);
     }
     while (tvb_offset_exists(tvb, offset)) {
-      tn3270_cmd = tvb_get_guint8(tvb, offset);
       if (pinfo->srcport == tn3270_info->outbound_port) {
         col_set_str(pinfo->cinfo, COL_INFO, "TN3270 Data from Mainframe");
         offset += dissect_outbound_stream(tn3270_tree, tvb, offset);
index c029bf6ab9552afe62d290ffdf91835cf5e975b1..eb7f84e6b224a40ecd5cd1aa23312975c717da41 100644 (file)
@@ -3078,7 +3078,6 @@ static guint32
 dissect_start_of_header(proto_tree *tn5250_tree, tvbuff_t *tvb, gint offset)
 {
   int start = offset;
-  int length = 0;
 
  /*TODO: Warn on invalid length. <= 7 */
   static const int *byte[] = {
@@ -3121,7 +3120,6 @@ dissect_start_of_header(proto_tree *tn5250_tree, tvbuff_t *tvb, gint offset)
       { 0, 0, 0, 0 }
   };
 
-  length = tvb_get_guint8(tvb, offset);
 
   offset += tn5250_add_hf_items(tn5250_tree, tvb, offset,
                                start_of_header_fields);
index 073c692dd0cf31db2f9fcbd3c72e97ea815db4ac..b9a11befb3c240066a31ef0fc3c93f17a0076243 100644 (file)
@@ -922,7 +922,7 @@ dissect_uma_IE(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
        proto_item      *urr_ie_item;
        proto_tree      *urr_ie_tree;
        char            *string;
-       guint16         GPRS_user_data_transport_UDP_port,UNC_tcp_port,RTP_UDP_port,RTCP_UDP_port, communication_port;
+       guint16         GPRS_user_data_transport_UDP_port,UNC_tcp_port,RTP_UDP_port,RTCP_UDP_port;
        guint32         udr;
        conversation_t *conversation;
        address         dst_addr, null_addr;
@@ -1117,7 +1117,6 @@ dissect_uma_IE(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
                break;
        case 25:
                /* 11.2.25 Communication Port Identity */
-               communication_port = tvb_get_ntohs(tvb,ie_offset);
                proto_tree_add_item(urr_ie_tree, hf_uma_urr_communication_port, tvb, ie_offset, 2, FALSE);
                break;
 
index 39d5fea98b43bc4368996980eb1a06f93c3e1624..3a22dbd7eeaa544689918164dd799f74aee3fc7e 100644 (file)
@@ -5535,14 +5535,13 @@ dissect_x11_error(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
                   gboolean little_endian)
 {
       int offset = 0, *offsetp = &offset, left;
-      unsigned char errorcode, error;
+      unsigned char errorcode;
       proto_item *ti;
       proto_tree *t;
 
       ti = proto_tree_add_item(tree, proto_x11, tvb, 0, -1, FALSE);
       t = proto_item_add_subtree(ti, ett_x11);
 
-      error = tvb_get_guint8(tvb, offset);
       CARD8(error);
 
       errorcode = tvb_get_guint8(tvb, offset);