Fix various warnings in (hopefully) the right ways.
authoreapache <eapache@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 28 Sep 2013 02:41:49 +0000 (02:41 +0000)
committereapache <eapache@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 28 Sep 2013 02:41:49 +0000 (02:41 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@52236 f5534014-38df-0310-8fa8-9805f1628bb7

plugins/wimax/msg_dcd.c
plugins/wimax/msg_reg_req.c
plugins/wimax/msg_rep.c
plugins/wimax/msg_rng_req.c
plugins/wimax/msg_rng_rsp.c
plugins/wimax/packet-wmx.c
plugins/wimax/wimax_utils.c

index 9d50652f5f180ac0d0fda96d8dd34a4a334ef91b..1d2942177c841d8d263c74637281a86e40bcd4c4 100644 (file)
@@ -607,7 +607,7 @@ static void dissect_mac_mgmt_msg_dcd_decoder(tvbuff_t *tvb, packet_info *pinfo,
                                }
                                case DCD_TLV_T_33_ASR:
                                {
-                                       tlv_tree = add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_33_asr, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+                                       tlv_item = add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_33_asr, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
                                        tlv_tree = proto_item_add_subtree(tlv_item, ett_mac_mgmt_msg_dcd_decoder);
                                        tlv_item = proto_tree_add_item(tlv_tree, hf_dcd_tlv_t_33_asr_m, tvb, offset, 1, ENC_BIG_ENDIAN);
                                        proto_item_append_text(tlv_item, " frames");
@@ -1253,4 +1253,4 @@ void proto_reg_handoff_mac_mgmt_msg_dcd(void)
 
        dcd_handle = create_dissector_handle(dissect_mac_mgmt_msg_dcd_decoder, proto_mac_mgmt_msg_dcd_decoder);
        dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_DCD, dcd_handle);
-}
\ No newline at end of file
+}
index d8a18871c174f42a9dcbb71ae4207afd73d7fcda..752fe15c42cf0c662467b62592c65caefe783e83 100644 (file)
@@ -219,7 +219,6 @@ void dissect_extended_tlv(proto_tree *reg_req_tree, gint tlv_type, tvbuff_t *tvb
 {
        proto_item *tlv_item;
        proto_tree *tlv_tree;
-       proto_tree *sub_tree = NULL;
        guint tvb_len;
        tlv_info_t tlv_info;
        guint tlv_end;
index 50b7704ab17e0d2331bcf03345d51ff941380834..0c66e66c912a47f8cd0b4363238ded19e9db1bec 100644 (file)
@@ -499,7 +499,7 @@ static void dissect_mac_mgmt_msg_rep_rsp_decoder(tvbuff_t *tvb, packet_info *pin
                                                                db_val = tvb_get_guint8(tvb, offset + tlv_offset) - 20;
                                                                if (db_val > 37)
                                                                        db_val = 37;
-                                                               proto_item_append_text(ti, " (%d dBm)", db_val);
+                                                               proto_item_append_text(ti_item, " (%d dBm)", db_val);
                                                                ti = proto_tree_add_item(ti_tree, hf_rep_rsp_report_type_cinr_report_deviation, tvb, (offset + tlv_offset +1), 1, ENC_BIG_ENDIAN);
                                                                db_val = tvb_get_guint8(tvb, offset + tlv_offset + 1) - 20;
                                                                if (db_val > 37)
index 394691154e88bc55c3d23a32750347ad22ece61f..5023f0fadfb6f96b39d31aeb6b11f86685e88eaa 100644 (file)
@@ -287,7 +287,7 @@ static void dissect_mac_mgmt_msg_rng_req_decoder(tvbuff_t *tvb, packet_info *pin
                                        add_tlv_subtree(&tlv_info, rng_req_tree, hf_rng_req_power_down_indicator, tvb, offset, ENC_BIG_ENDIAN);
                                        break;
                                case RNG_REQ_REQUESTED_DNLK_REP_CODING_LEVEL:
-                                       tlv_tree = add_tlv_subtree(&tlv_info, rng_req_tree, hf_rng_req_requested_rep_coding_level, tvb, offset, ENC_BIG_ENDIAN);
+                                       tlv_item = add_tlv_subtree(&tlv_info, rng_req_tree, hf_rng_req_requested_rep_coding_level, tvb, offset, ENC_BIG_ENDIAN);
                                        tlv_tree = proto_item_add_subtree(tlv_item, ett_mac_mgmt_msg_rng_req_decoder);
                                        proto_tree_add_item(tlv_tree, hf_rng_req_repetition_coding_level, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
                                        proto_tree_add_item(tlv_tree, hf_rng_req_requested_downlink_repetition_coding_level_reserved, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
index 18642461a6e20b14929fc58f441f11916f5af20d..9508900aea95ad8d386e312cd3ee55d93134cc40 100644 (file)
@@ -281,7 +281,6 @@ static void dissect_mac_mgmt_msg_rng_rsp_decoder(tvbuff_t *tvb, packet_info *pin
        proto_item *tlv_item = NULL;
        proto_tree *rng_rsp_tree;
        proto_tree *sub_tree = NULL;
-       proto_tree *tlv_tree = NULL;
        tlv_info_t tlv_info;
        gint tlv_type;
        guint tlv_len;
index c77f87b547e7e0853415f412a4b777ed61a0800c..e294423786ce306ca32524255ef89dc0d17c5923 100644 (file)
@@ -719,12 +719,11 @@ proto_tree *add_tlv_subtree_no_item(tlv_info_t *self, proto_tree *tree, int hfin
 /* return:                                                   */
 /*   pointer to a proto_tree                                 */
 /*************************************************************/
-proto_tree *add_protocol_subtree(tlv_info_t *self, gint idx, proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, const char *label)
+proto_tree *add_protocol_subtree(tlv_info_t *self, gint idx, proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length _U_, const char *label)
 {
        /* Declare local variables */
        proto_tree *tlv_tree;
        proto_item *tlv_item;
-       guint start_of_tlv;
        gint tlv_value_length, tlv_val_offset;
        guint8 size_of_tlv_length_field;
        guint8 tlv_type;
@@ -737,7 +736,6 @@ proto_tree *add_protocol_subtree(tlv_info_t *self, gint idx, proto_tree *tree, i
 
        /* Retrieve the necessary TLV information */
        tlv_val_offset = get_tlv_value_offset(self);
-       start_of_tlv = start - tlv_val_offset;
        tlv_value_length = get_tlv_length(self);
        size_of_tlv_length_field = get_tlv_size_of_length(self);
        tlv_type = get_tlv_type(self);
index f0de5a3ef5c0192d28a493d5f9612e95b49eba6b..4ec011b57f893b1960a316c6d913bc2eb2eaf82e 100644 (file)
@@ -1711,7 +1711,6 @@ void wimax_error_parameter_set_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_
        gint  tlv_type;
        proto_item *ceps_item = NULL;
        proto_tree *ceps_tree = NULL;
-       proto_tree *tlv_tree = NULL;
        tlv_info_t tlv_info;
 
        /* get the tvb reported length */
@@ -2909,7 +2908,6 @@ void wimax_tek_parameters_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree
        guint offset;
        guint tvb_len, tlv_len, tlv_value_offset;
        gint  tlv_type;
-       proto_tree *tlv_tree = NULL;
        tlv_info_t tlv_info;
 
        /* get the tvb reported length */
@@ -3198,7 +3196,6 @@ void wimax_security_capabilities_decoder(tvbuff_t *tvb, packet_info *pinfo, prot
 /******************************************************************/
 void wimax_vendor_specific_information_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 {
-       proto_tree *tlv_tree = NULL;
        guint offset;
        guint tvb_len, tlv_len, tlv_value_offset;
        gint  tlv_type;