From 5df9055044073513e824ccdc54357dc6cffb5415 Mon Sep 17 00:00:00 2001 From: pascal Date: Mon, 30 Apr 2012 08:38:26 +0000 Subject: Fix a few clang warnings svn path=/trunk/; revision=42343 --- epan/dissectors/packet-gprs-llc.c | 1 - epan/dissectors/packet-gsm_a_bssmap.c | 16 +++++----------- epan/dissectors/packet-gsm_sms.c | 20 -------------------- 3 files changed, 5 insertions(+), 32 deletions(-) (limited to 'epan/dissectors') diff --git a/epan/dissectors/packet-gprs-llc.c b/epan/dissectors/packet-gprs-llc.c index 847d98ea96..817695e0f6 100644 --- a/epan/dissectors/packet-gprs-llc.c +++ b/epan/dissectors/packet-gprs-llc.c @@ -1030,7 +1030,6 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case U_FORMAT: offset +=1; - tmp = 0; tmp = ctrl_fld_fb & 0xf; col_append_str(pinfo->cinfo, COL_INFO, ", U, "); diff --git a/epan/dissectors/packet-gsm_a_bssmap.c b/epan/dissectors/packet-gsm_a_bssmap.c index 76de3297ec..bbd38794e0 100644 --- a/epan/dissectors/packet-gsm_a_bssmap.c +++ b/epan/dissectors/packet-gsm_a_bssmap.c @@ -1032,8 +1032,6 @@ be_l3_header_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint curr_offset = offset; - oct = tvb_get_guint8(tvb, curr_offset); - proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, curr_offset<<3, 4, ENC_BIG_ENDIAN); proto_tree_add_item(tree, hf_gsm_a_L3_protocol_discriminator, tvb, curr_offset, 1, ENC_BIG_ENDIAN); @@ -1551,7 +1549,7 @@ be_tot_res_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 curr_offset+=2; /* Total number of accessible half rate channels */ proto_tree_add_item(tree, hf_gsm_a_bssmap_tot_no_of_hr_ch, tvb, curr_offset, 2, ENC_BIG_ENDIAN); - curr_offset+=2; + /*curr_offset+=2;*/ return(len); @@ -1574,7 +1572,7 @@ be_lsa_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offse * 1 it is a universal LSA. */ proto_tree_add_item(tree, hf_gsm_a_bssmap_lsa_id, tvb, curr_offset, 3, ENC_BIG_ENDIAN); - curr_offset+=3; + /*curr_offset+=3;*/ return(len); @@ -2369,23 +2367,19 @@ be_ciph_resp_mode(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint static guint16 be_l3_msg(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_) { - guint32 curr_offset; tvbuff_t *l3_tvb; - curr_offset = offset; - - proto_tree_add_text(tree, tvb, curr_offset, len, + proto_tree_add_text(tree, tvb, offset, len, "Layer 3 Message Contents"); /* * dissect the embedded DTAP message */ - l3_tvb = tvb_new_subset(tvb, curr_offset, len, len); + l3_tvb = tvb_new_subset(tvb, offset, len, len); /* Octet j (j = 3, 4, ..., n) is the unchanged octet j of a radio interface layer 3 message * as defined in 3GPP TS 24.008, n is equal to the length of that radio interface layer 3 message. */ call_dissector(dtap_handle, l3_tvb, g_pinfo, g_tree); - curr_offset += len; return(len); } @@ -2429,7 +2423,7 @@ be_trace_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 o proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_trace_msc_record_type, tvb, bit_offset, 2, ENC_BIG_ENDIAN); bit_offset += 2; proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_trace_invoking_event, tvb, bit_offset, 2, ENC_BIG_ENDIAN); - bit_offset += 2; + /*bit_offset += 2;*/ curr_offset++; /* no length check possible */ diff --git a/epan/dissectors/packet-gsm_sms.c b/epan/dissectors/packet-gsm_sms.c index 14e3b17c1d..a5359401c4 100644 --- a/epan/dissectors/packet-gsm_sms.c +++ b/epan/dissectors/packet-gsm_sms.c @@ -2238,8 +2238,6 @@ dis_iei_uds(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint8 length) oct); offset++; - oct = tvb_get_guint8(tvb, offset); - proto_tree_add_text(tree, tvb, offset, length - 1, "User Defined Sound "); @@ -2285,8 +2283,6 @@ dis_iei_la(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint8 length) oct); offset++; - oct = tvb_get_guint8(tvb, offset); - proto_tree_add_text(tree, tvb, offset, length - 1, "Large Animation "); @@ -2307,8 +2303,6 @@ dis_iei_sa(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint8 length) oct); offset++; - oct = tvb_get_guint8(tvb, offset); - proto_tree_add_text(tree, tvb, offset, length - 1, "Small Animation "); @@ -2330,8 +2324,6 @@ dis_iei_lp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint8 length) oct); offset++; - oct = tvb_get_guint8(tvb, offset); - proto_tree_add_text(tree, tvb, offset, length - 1, "Large Picture "); @@ -2352,8 +2344,6 @@ dis_iei_sp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint8 length) oct); offset++; - oct = tvb_get_guint8(tvb, offset); - proto_tree_add_text(tree, tvb, offset, length - 1, "Small Picture "); @@ -2389,8 +2379,6 @@ dis_iei_vp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint8 length) oct); offset++; - - oct = tvb_get_guint8(tvb, offset); proto_tree_add_text(tree, tvb, offset, length - 3, "Variable Picture "); @@ -2758,8 +2746,6 @@ dis_field_ud(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint32 length, gb * so that the text doesn't get truncated when we add it to * the tree. */ - out_len = 0; - total_sms_len = 0; for(i = 0 ; i < g_frags; i++) { @@ -2941,7 +2927,6 @@ dis_msg_deliver(tvbuff_t *tvb, proto_tree *tree, guint32 offset) gboolean compressed; gboolean udhi; - udl = 0; saved_offset = offset; length = tvb_length_remaining(tvb, offset); @@ -3138,7 +3123,6 @@ dis_msg_submit(tvbuff_t *tvb, proto_tree *tree, guint32 offset) proto_tree_add_item(tree, hf_gsm_sms_tp_mti_up, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - oct = tvb_get_guint8(tvb, offset); proto_tree_add_item(tree, hf_gsm_sms_tp_mr, tvb, offset, 1, ENC_BIG_ENDIAN); @@ -3314,7 +3298,6 @@ dis_msg_status_report(tvbuff_t *tvb, proto_tree *tree, guint32 offset) proto_tree_add_item(tree, hf_gsm_sms_tp_mti_down, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - oct = tvb_get_guint8(tvb, offset); proto_tree_add_item(tree, hf_gsm_sms_tp_mr, tvb, offset, 1, ENC_BIG_ENDIAN); @@ -3413,9 +3396,6 @@ dis_msg_command(tvbuff_t *tvb, proto_tree *tree, guint32 offset) guint8 cdl; const gchar *str = NULL; - - cdl = 0; - proto_tree_add_item(tree, hf_gsm_sms_tp_udhi, tvb, offset, 1, ENC_BIG_ENDIAN); proto_tree_add_item(tree, hf_gsm_sms_tp_srr, tvb, offset, 1, ENC_BIG_ENDIAN); proto_tree_add_item(tree, hf_gsm_sms_tp_mti_up, tvb, offset, 1, ENC_BIG_ENDIAN); -- cgit v1.2.3