diff options
author | Bill Meier <wmeier@newsguy.com> | 2011-07-18 19:11:32 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2011-07-18 19:11:32 +0000 |
commit | 3f7e7672c9feb345f2ee9c9a14e1151b88f598c9 (patch) | |
tree | d357c244b5aec954d8451d8570d5f9a9d0ae95cb /epan | |
parent | 7e6b1202c9f3d7d2504e7004eae6cb63047ffad6 (diff) |
Fix gcc 4.6 "set but not used [-Wunused-but-set-variable]" warnings.
svn path=/trunk/; revision=38095
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-per.c | 73 | ||||
-rw-r--r-- | epan/dissectors/packet-pppoe.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-ptp.c | 7 | ||||
-rw-r--r-- | epan/dissectors/packet-rdt.c | 18 | ||||
-rw-r--r-- | epan/dissectors/packet-rpcap.c | 5 | ||||
-rw-r--r-- | epan/dissectors/packet-rsvp.c | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-rtcp.c | 19 | ||||
-rw-r--r-- | epan/dissectors/packet-rtmpt.c | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-rtps.c | 11 | ||||
-rw-r--r-- | epan/dissectors/packet-rtps2.c | 29 |
10 files changed, 61 insertions, 117 deletions
diff --git a/epan/dissectors/packet-per.c b/epan/dissectors/packet-per.c index b769e59ec0..4751f33648 100644 --- a/epan/dissectors/packet-per.c +++ b/epan/dissectors/packet-per.c @@ -221,7 +221,7 @@ tvbuff_t *new_octet_aligned_subset_bits(tvbuff_t *tvb, guint32 boffset, asn1_ctx new_length = no_of_bits/8; remainderval = no_of_bits % 8; - + if(remainderval){ new_length++; }else{ @@ -397,9 +397,7 @@ dissect_per_length_determinant(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx _ }else{ char *str; guint32 val; - gint val_start; - val_start = offset>>3; val = 0; str=ep_alloc(256); @@ -629,7 +627,7 @@ dissect_per_IA5String(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tre return offset; } -/* XXX we dont do >64k length strings yet */ +/* XXX we don't do >64k length strings yet */ static guint32 dissect_per_restricted_character_string_sorted(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, int min_len, int max_len, gboolean has_extension _U_,const char *alphabet, int alphabet_length, tvbuff_t **value_tvb) { @@ -689,14 +687,14 @@ DEBUG_ENTRY("dissect_per_restricted_character_string"); bits_per_char=8; } } - /* 27.4 If the type is extensible for PER encodings (see 9.3.16), - * then a bit-field consisting of a single bit shall be added to the field-list. + /* 27.4 If the type is extensible for PER encodings (see 9.3.16), + * then a bit-field consisting of a single bit shall be added to the field-list. * The single bit shall be set to zero if the value is within the range of the extension root, - * and to one otherwise. If the value is outside the range of the extension root, - * then the following encoding shall be as if there was no effective size constraint, - * and shall have an effective permitted-alphabet constraint that consists of the set of characters + * and to one otherwise. If the value is outside the range of the extension root, + * then the following encoding shall be as if there was no effective size constraint, + * and shall have an effective permitted-alphabet constraint that consists of the set of characters * of the unconstrained type. - * NOTE - Only the known-multiplier character string types can be extensible for PER encodings. + * NOTE - Only the known-multiplier character string types can be extensible for PER encodings. * Extensibility markers on other character string types do not affect the PER encoding. */ @@ -731,7 +729,7 @@ DEBUG_ENTRY("dissect_per_restricted_character_string"); } if(!length){ - /* there is no string at all, so dont do any byte alignment */ + /* there is no string at all, so don't do any byte alignment */ /* byte_aligned=FALSE; */ /* Advance offset to next 'element' */ offset = offset + 1; } @@ -1223,7 +1221,6 @@ dissect_per_constrained_integer(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, nstime_t timeval; header_field_info *hfi; int num_bits; - int pad; gboolean tmp; DEBUG_ENTRY("dissect_per_constrained_integer"); @@ -1264,7 +1261,6 @@ DEBUG_ENTRY("dissect_per_constrained_integer"); } num_bits=0; - pad=0; val=0; timeval.secs=val; timeval.nsecs=0; /* 10.5.4 If "range" has the value 1, then the result of the encoding shall be an empty bit-field (no bits).*/ @@ -1343,7 +1339,6 @@ DEBUG_ENTRY("dissect_per_constrained_integer"); } else if(range==256){ /* 10.5.7.2 */ num_bits=8; - pad=7-(offset&0x07); /* in the aligned case, align to byte boundary */ BYTE_ALIGN_OFFSET(offset); @@ -1355,7 +1350,6 @@ DEBUG_ENTRY("dissect_per_constrained_integer"); } else if(range<=65536){ /* 10.5.7.3 */ num_bits=16; - pad=7-(offset&0x07); /* in the aligned case, align to byte boundary */ BYTE_ALIGN_OFFSET(offset); @@ -1418,7 +1412,6 @@ dissect_per_constrained_integer_64b(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *a nstime_t timeval; header_field_info *hfi; int num_bits; - int pad; gboolean tmp; DEBUG_ENTRY("dissect_per_constrained_integer_64b"); @@ -1464,7 +1457,6 @@ DEBUG_ENTRY("dissect_per_constrained_integer_64b"); } num_bits=0; - pad=0; val=0; timeval.secs=0; timeval.nsecs=0; /* 10.5.4 If "range" has the value 1, then the result of the encoding shall be an empty bit-field (no bits).*/ @@ -1543,7 +1535,6 @@ DEBUG_ENTRY("dissect_per_constrained_integer_64b"); } else if(range==256){ /* 10.5.7.2 */ num_bits=8; - pad=7-(offset&0x07); /* in the aligned case, align to byte boundary */ BYTE_ALIGN_OFFSET(offset); @@ -1555,7 +1546,6 @@ DEBUG_ENTRY("dissect_per_constrained_integer_64b"); } else if(range<=65536){ /* 10.5.7.3 */ num_bits=16; - pad=7-(offset&0x07); /* in the aligned case, align to byte boundary */ BYTE_ALIGN_OFFSET(offset); @@ -1611,7 +1601,8 @@ DEBUG_ENTRY("dissect_per_constrained_integer_64b"); } actx->created_item = it; if (value) *value = val; - return offset;} + return offset; +} /* 13 Encoding the enumerated type */ guint32 @@ -1688,7 +1679,7 @@ dissect_per_real(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tr guint32 dissect_per_choice(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, gint ett_index, const per_choice_t *choice, gint *value) { - gboolean extension_present, extension_flag; + gboolean /*extension_present,*/ extension_flag; int extension_root_entries; int extension_addition_entries; guint32 choice_index; @@ -1704,10 +1695,10 @@ DEBUG_ENTRY("dissect_per_choice"); /* 22.5 */ if (choice[0].extension == ASN1_NO_EXTENSIONS){ - extension_present = FALSE; + /*extension_present = FALSE; ?? */ extension_flag = FALSE; } else { - extension_present = TRUE; + /*extension_present = TRUE; ?? */ offset = dissect_per_boolean(tvb, offset, actx, tree, hf_per_extension_bit, &extension_flag); if (!display_internal_per_fields) PROTO_ITEM_SET_HIDDEN(actx->created_item); } @@ -1844,7 +1835,7 @@ index_get_field_name(const per_sequence_t *sequence, int idx) guint32 dissect_per_sequence(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *parent_tree, int hf_index, gint ett_index, const per_sequence_t *sequence) { - gboolean extension_present, extension_flag, optional_field_flag; + gboolean /*extension_present,*/ extension_flag, optional_field_flag; proto_item *item; proto_tree *tree; guint32 old_offset=offset; @@ -1863,9 +1854,9 @@ DEBUG_ENTRY("dissect_per_sequence"); /* 18.1 */ extension_flag=0; if(sequence[0].extension==ASN1_NO_EXTENSIONS){ - extension_present=0; + /*extension_present=0; ?? */ } else { - extension_present=1; + /*extension_present=1; ?? */ offset=dissect_per_boolean(tvb, offset, actx, tree, hf_per_extension_bit, &extension_flag); if (!display_internal_per_fields) PROTO_ITEM_SET_HIDDEN(actx->created_item); } @@ -1931,13 +1922,13 @@ DEBUG_ENTRY("dissect_per_sequence"); In my book, there is a semantic difference between having a comment that says that the value can not be zero and stating that the lb is 1. - I dont know if this is right or not but it makes + I don't know if this is right or not but it makes some of the very few captures I have decode properly. It could also be that the captures I have are generated by a broken implementation. - If this is wrong and you dont report it as a bug - then it wont get fixed! + If this is wrong and you don't report it as a bug + then it won't get fixed! */ num_extensions+=1; @@ -1978,7 +1969,7 @@ DEBUG_ENTRY("dissect_per_sequence"); offset=dissect_per_length_determinant(tvb, offset, actx, tree, hf_per_open_type_length, &length); if(i>=num_known_extensions){ - /* we dont know how to decode this extension */ + /* we don't know how to decode this extension */ offset+=length*8; expert_add_info_format(actx->pinfo, item, PI_UNDECODED, PI_NOTE, "unknown sequence extension"); continue; @@ -2033,9 +2024,9 @@ static tvbuff_t *dissect_per_bit_string_display(tvbuff_t *tvb, guint32 offset, a tvbuff_t *out_tvb = NULL; guint32 pad_length=0; guint64 value; - + out_tvb = new_octet_aligned_subset_bits(tvb, offset, actx, length); - + if (hfi) { actx->created_item = proto_tree_add_item(tree, hf_index, out_tvb, 0, -1, FALSE); proto_item_append_text(actx->created_item, " [bit length %u", length); @@ -2043,7 +2034,7 @@ static tvbuff_t *dissect_per_bit_string_display(tvbuff_t *tvb, guint32 offset, a pad_length = 8-(length%8); proto_item_append_text(actx->created_item, ", %u LSB pad bits", pad_length); } - + if (length<=64) { /* if read into 64 bits also handle length <= 24, 40, 48, 56 bits */ if (length<=8) { value = tvb_get_bits8(out_tvb, 0, length); @@ -2072,7 +2063,7 @@ static tvbuff_t *dissect_per_bit_string_display(tvbuff_t *tvb, guint32 offset, a }else { value = tvb_get_bits64(out_tvb, 0, length, FALSE); } - proto_item_append_text(actx->created_item, ", %s decimal value %" G_GINT64_MODIFIER "u", + proto_item_append_text(actx->created_item, ", %s decimal value %" G_GINT64_MODIFIER "u", decode_bits_in_field(0, length, value), value); } proto_item_append_text(actx->created_item, "]"); @@ -2083,7 +2074,7 @@ static tvbuff_t *dissect_per_bit_string_display(tvbuff_t *tvb, guint32 offset, a guint32 dissect_per_bit_string(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, int min_len, int max_len, gboolean has_extension, tvbuff_t **value_tvb) { - gint val_start, val_length; + /*gint val_start, val_length;*/ guint32 length; header_field_info *hfi; tvbuff_t *out_tvb = NULL; @@ -2100,7 +2091,7 @@ DEBUG_ENTRY("dissect_per_bit_string"); min_len = 0; } /* 15.6 If an extension marker is present in the size constraint specification of the bitstring type, - * a single bit shall be added to the field-list in a bit-field of length one. + * a single bit shall be added to the field-list in a bit-field of length one. * The bit shall be set to 1 if the length of this encoding is not within the range of the extension root, * and zero otherwise. */ @@ -2116,8 +2107,9 @@ DEBUG_ENTRY("dissect_per_bit_string"); } out_tvb = dissect_per_bit_string_display(tvb, offset, actx, tree, hf_index, hfi, length); } - val_start = offset>>3; - val_length = (length+7)/8; + /* XXX: ?? */ + /*val_start = offset>>3;*/ + /*val_length = (length+7)/8;*/ offset+=length; if (value_tvb) @@ -2168,8 +2160,9 @@ DEBUG_ENTRY("dissect_per_bit_string"); } out_tvb = dissect_per_bit_string_display(tvb, offset, actx, tree, hf_index, hfi, length); } - val_start = offset>>3; - val_length = (length+7)/8; + /* XXX: ?? */ + /*val_start = offset>>3;*/ + /*val_length = (length+7)/8;*/ offset+=length; if (value_tvb) diff --git a/epan/dissectors/packet-pppoe.c b/epan/dissectors/packet-pppoe.c index a6c0205d4d..4d8456264d 100644 --- a/epan/dissectors/packet-pppoe.c +++ b/epan/dissectors/packet-pppoe.c @@ -1044,9 +1044,7 @@ void proto_reg_handoff_pppoed(void) static void dissect_pppoes(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { guint8 pppoe_code; - guint16 pppoe_session_id; guint16 reported_payload_length; - guint16 poe_tag; guint16 poe_tag_length; gint actual_payload_length; gint length, reported_length; @@ -1069,7 +1067,6 @@ static void dissect_pppoes(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) val_to_str(pppoe_code, code_vals, "Unknown")); } - pppoe_session_id = tvb_get_ntohs(tvb, 2); reported_payload_length = tvb_get_ntohs(tvb, 4); actual_payload_length = tvb_reported_length_remaining(tvb, 6); @@ -1088,7 +1085,6 @@ static void dissect_pppoes(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (PPPOE_TAG_CREDITS == tvb_get_ntohs(tvb, 6)) { tagstart = 6; - poe_tag = tvb_get_ntohs(tvb, tagstart); poe_tag_length = tvb_get_ntohs(tvb, tagstart + 2); /* Create tags subtree */ diff --git a/epan/dissectors/packet-ptp.c b/epan/dissectors/packet-ptp.c index fdb2537909..208036ca42 100644 --- a/epan/dissectors/packet-ptp.c +++ b/epan/dissectors/packet-ptp.c @@ -2591,7 +2591,6 @@ dissect_ptp_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } case PTP_V2_FOLLOWUP_MESSAGE:{ - guint16 tlv_type; guint16 tlv_length; proto_item *tlv_ti; proto_tree *ptp_tlv_tree; @@ -2610,7 +2609,6 @@ dissect_ptp_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if(ptp_v2_transport_specific & PTP_V2_TRANSPORTSPECIFIC_ASPACKET_BITMASK){ /* There are TLV's to be processed */ - tlv_type = tvb_get_ntohs (tvb, PTP_AS_FU_TLV_INFORMATION_OFFSET + PTP_AS_FU_TLV_TYPE_OFFSET); tlv_length = tvb_get_ntohs (tvb, PTP_AS_FU_TLV_INFORMATION_OFFSET + PTP_AS_FU_TLV_LENGTHFIELD_OFFSET); tlv_ti = proto_tree_add_text( @@ -2764,7 +2762,7 @@ dissect_ptp_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } case PTP_V2_SIGNALLING_MESSAGE:{ - guint16 tlv_type, tlv_length; + guint16 tlv_length; proto_item *tlv_ti, *sig_tlv_flags_ti; proto_tree *ptp_tlv_tree, *sig_tlv_flags_tree; @@ -2778,7 +2776,6 @@ dissect_ptp_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if(ptp_v2_transport_specific & PTP_V2_TRANSPORTSPECIFIC_ASPACKET_BITMASK){ /* There are TLV's to be processed */ - tlv_type = tvb_get_ntohs (tvb, PTP_AS_SIG_TLV_MESSAGEINTERVALREQUEST_OFFSET + PTP_AS_SIG_TLV_TYPE_OFFSET); tlv_length = tvb_get_ntohs (tvb, PTP_AS_SIG_TLV_MESSAGEINTERVALREQUEST_OFFSET + PTP_AS_SIG_TLV_LENGTHFIELD_OFFSET); tlv_ti = proto_tree_add_text( @@ -2872,7 +2869,7 @@ dissect_ptp_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree_add_item(ptp_tree, hf_ptp_v2_mm_lengthField, tvb, PTP_V2_SIG_TARGETPORTID_OFFSET+4, 2, FALSE); - tlv_type = tvb_get_ntohs (tvb, PTP_V2_MM_TLV_TYPE_OFFSET); + /*tlv_type = tvb_get_ntohs (tvb, PTP_V2_MM_TLV_TYPE_OFFSET);*/ tlv_length = tvb_get_ntohs (tvb, PTP_V2_MM_TLV_LENGTHFIELD_OFFSET); if (tlv_length <= 2) diff --git a/epan/dissectors/packet-rdt.c b/epan/dissectors/packet-rdt.c index de0e3ceba7..674ff46131 100644 --- a/epan/dissectors/packet-rdt.c +++ b/epan/dissectors/packet-rdt.c @@ -754,10 +754,7 @@ guint dissect_rdt_ack_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree /* Dissect an att-request packet */ guint dissect_rdt_rtt_request_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset) { - guint8 flags1; - /* Flags in first byte */ - flags1 = tvb_get_guint8(tvb, offset); offset++; /* Packet type */ @@ -772,10 +769,7 @@ guint dissect_rdt_rtt_request_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tr /* Dissect an att-response packet */ guint dissect_rdt_rtt_response_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset) { - guint8 flags1; - /* Flags in first byte */ - flags1 = tvb_get_guint8(tvb, offset); offset++; /* Packet type */ @@ -795,10 +789,7 @@ guint dissect_rdt_rtt_response_packet(tvbuff_t *tvb, packet_info *pinfo, proto_t /* Dissect an congestion packet */ guint dissect_rdt_congestion_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset) { - guint8 flags1; - /* Flags in first byte */ - flags1 = tvb_get_guint8(tvb, offset); offset++; /* Packet type */ @@ -1023,7 +1014,6 @@ guint dissect_rdt_transport_info_request_packet(tvbuff_t *tvb, packet_info *pinf guint8 flags1; guint8 request_rtt_info_flag; guint8 request_buffer_info_flag; - guint32 request_time_msec; proto_tree *flags_tree; proto_item *ti; @@ -1053,7 +1043,6 @@ guint dissect_rdt_transport_info_request_packet(tvbuff_t *tvb, packet_info *pinf if (request_rtt_info_flag) { - request_time_msec = tvb_get_ntohl(tvb, offset); proto_tree_add_item(tree, hf_rdt_tirq_request_time_msec, tvb, offset, 4, FALSE); offset += 4; } @@ -1070,8 +1059,6 @@ guint dissect_rdt_transport_info_response_packet(tvbuff_t *tvb, packet_info *pin guint8 has_rtt_info; guint8 is_delayed; guint8 has_buffer_info; - guint32 request_time_msec; - guint32 response_time_msec; proto_tree *flags_tree; proto_item *ti; @@ -1105,13 +1092,11 @@ guint dissect_rdt_transport_info_response_packet(tvbuff_t *tvb, packet_info *pin /* RTT info */ if (has_rtt_info) { - request_time_msec = tvb_get_ntohl(tvb, offset); proto_tree_add_item(tree, hf_rdt_tirp_request_time_msec, tvb, offset, 4, FALSE); offset += 4; if (is_delayed) { - response_time_msec = tvb_get_ntohl(tvb, offset); proto_tree_add_item(tree, hf_rdt_tirp_response_time_msec, tvb, offset, 4, FALSE); offset += 4; } @@ -1225,10 +1210,7 @@ guint dissect_rdt_bw_probing_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tre /* Dissect an unknown control packet */ guint dissect_rdt_unknown_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset) { - guint8 flags1; - /* Flags in first byte */ - flags1 = tvb_get_guint8(tvb, offset); proto_tree_add_item(tree, hf_rdt_unk_flags1, tvb, offset, 1, FALSE); offset++; diff --git a/epan/dissectors/packet-rpcap.c b/epan/dissectors/packet-rpcap.c index aafd074647..28a8084d50 100644 --- a/epan/dissectors/packet-rpcap.c +++ b/epan/dissectors/packet-rpcap.c @@ -803,9 +803,8 @@ dissect_rpcap (tvbuff_t *tvb, packet_info *pinfo, proto_tree *top_tree) proto_item *ti; tvbuff_t *new_tvb; gint len, offset = 0; - guint8 version, msg_type; + guint8 msg_type; guint16 msg_value; - guint32 plen; col_set_str (pinfo->cinfo, COL_PROTOCOL, PSNAME); @@ -814,7 +813,6 @@ dissect_rpcap (tvbuff_t *tvb, packet_info *pinfo, proto_tree *top_tree) ti = proto_tree_add_item (top_tree, proto_rpcap, tvb, offset, -1, FALSE); tree = proto_item_add_subtree (ti, ett_rpcap); - version = tvb_get_guint8 (tvb, offset); proto_tree_add_item (tree, hf_version, tvb, offset, 1, FALSE); offset++; @@ -837,7 +835,6 @@ dissect_rpcap (tvbuff_t *tvb, packet_info *pinfo, proto_tree *top_tree) } offset += 2; - plen = tvb_get_ntohl (tvb, offset); proto_tree_add_item (tree, hf_plen, tvb, offset, 4, FALSE); offset += 4; diff --git a/epan/dissectors/packet-rsvp.c b/epan/dissectors/packet-rsvp.c index 5b65584331..9c70594a41 100644 --- a/epan/dissectors/packet-rsvp.c +++ b/epan/dissectors/packet-rsvp.c @@ -6229,7 +6229,6 @@ dissect_rsvp_vendor_private_use(proto_tree *ti _U_, * the private use of the registered enterprise. */ proto_item *hidden_item = NULL; - guint32 enterprise_code = 0; hidden_item = proto_tree_add_item(rsvp_object_tree, hf_rsvp_filter[RSVPF_PRIVATE_OBJ], @@ -6237,7 +6236,6 @@ dissect_rsvp_vendor_private_use(proto_tree *ti _U_, PROTO_ITEM_SET_HIDDEN(hidden_item); proto_tree_add_text(rsvp_object_tree, tvb, offset + 3, 1, "C-type: %u", type); - enterprise_code = tvb_get_ntohl(tvb, offset + 4); proto_tree_add_item(rsvp_object_tree, hf_rsvp_filter[RSVPF_ENT_CODE], tvb, offset + 4, 4, FALSE); @@ -6587,9 +6585,7 @@ dissect_rsvp_msg_tree(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, static void dissect_rsvp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { - guint8 ver_flags; guint8 message_type; - int msg_length; int session_off, tempfilt_off; rsvp_conversation_info *rsvph; @@ -6602,9 +6598,7 @@ dissect_rsvp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) (pinfo->ipproto == IP_PROTO_RSVPE2EI) ? "RSVP-E2EI" : "RSVP"); col_clear(pinfo->cinfo, COL_INFO); - ver_flags = tvb_get_guint8(tvb, 0); message_type = tvb_get_guint8(tvb, 1); - msg_length = tvb_get_ntohs(tvb, 6); rsvph = ep_alloc0(sizeof(rsvp_conversation_info)); diff --git a/epan/dissectors/packet-rtcp.c b/epan/dissectors/packet-rtcp.c index 41eb89c129..daa3621333 100644 --- a/epan/dissectors/packet-rtcp.c +++ b/epan/dissectors/packet-rtcp.c @@ -954,7 +954,6 @@ dissect_rtcp_app( tvbuff_t *tvb,packet_info *pinfo, int offset, proto_tree *tree char ascii_name[5]; guint sdes_type = 0; guint item_len = 0; - guint items_start_offset; proto_tree *PoC1_tree; proto_item *PoC1_item; @@ -1000,7 +999,6 @@ dissect_rtcp_app( tvbuff_t *tvb,packet_info *pinfo, int offset, proto_tree *tree } /* Create a subtree for the PoC1 Application items; we don't yet know the length */ - items_start_offset = offset; /* Top-level poc tree */ PoC1_item = proto_tree_add_item(tree, hf_rtcp_app_poc1, tvb, offset, packet_len, FALSE); @@ -1304,7 +1302,7 @@ dissect_rtcp_app( tvbuff_t *tvb,packet_info *pinfo, int offset, proto_tree *tree case TBCP_BURST_RELEASE: { guint16 last_seq_no; - guint16 ignore_last_seq_no; + /*guint16 ignore_last_seq_no;*/ /* Sequence number of last RTP packet in burst */ proto_tree_add_item( PoC1_tree, hf_rtcp_app_poc1_last_pkt_seq_no, tvb, offset, 2, FALSE ); @@ -1313,8 +1311,9 @@ dissect_rtcp_app( tvbuff_t *tvb,packet_info *pinfo, int offset, proto_tree *tree /* Bit 16 is ignore flag */ offset += 2; proto_tree_add_item(PoC1_tree, hf_rtcp_app_poc1_ignore_seq_no, tvb, offset, 2, FALSE ); - ignore_last_seq_no = (tvb_get_ntohs(tvb, offset) & 0x8000); + /*ignore_last_seq_no = (tvb_get_ntohs(tvb, offset) & 0x8000);*/ + /* XXX: Was the intention to also show the "ignore_last_seq_no' flag in COL_INFO ? */ col_append_fstr(pinfo->cinfo, COL_INFO, " last_rtp_seq_no=%u", last_seq_no); @@ -1454,10 +1453,11 @@ dissect_rtcp_app( tvbuff_t *tvb,packet_info *pinfo, int offset, proto_tree *tree /* One SDES item for every set flag in contents array */ for ( i = 0; i < array_length(contents); ++i ) { if ( contents[i] ) { - guint sdes_type2, sdes_len2; + guint /*sdes_type2,*/ sdes_len2; /* (sdes_type2 not currently used...). Could complain if type doesn't match expected for item... */ - sdes_type2 = tvb_get_guint8( tvb, offset++ ); + /*sdes_type2 = tvb_get_guint8( tvb, offset );*/ + offset += 1; sdes_len2 = tvb_get_guint8( tvb, offset ); /* Add SDES field indicated as present */ @@ -1793,7 +1793,7 @@ dissect_rtcp_xr(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tree, for(;packet_len > 0; block_num++) { guint block_type = tvb_get_guint8(tvb, offset), block_length = 0; gint content_length = 0; - gboolean valid = TRUE; + /*gboolean valid = TRUE;*/ /* Create a subtree for this block, dont know the length yet*/ proto_item *block = proto_tree_add_text(tree, tvb, offset, -1, "Block %u", block_num); @@ -1807,7 +1807,8 @@ dissect_rtcp_xr(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tree, parse_xr_type_specific_field(tvb, offset + 1, block_type, xr_block_tree); if (packet_len >= 4) { block_length = tvb_get_ntohs(tvb, offset + 2); - valid = validate_xr_block_length(tvb, pinfo, offset + 2, block_type, block_length, xr_block_tree); + /* XXX: What if FALSE return from the following ?? */ + /*valid =*/ validate_xr_block_length(tvb, pinfo, offset + 2, block_type, block_length, xr_block_tree); } } else { proto_tree_add_text(xr_block_tree, tvb, offset + 1, packet_len, "Missing Required Block Headers"); @@ -2052,7 +2053,6 @@ dissect_rtcp_xr(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tree, case RTCP_XR_DUP_RLE: { /* 8 bytes of fixed header */ gint count = 0, skip = 8; - guint16 begin = 0; proto_item *chunks_item; proto_tree *chunks_tree; @@ -2061,7 +2061,6 @@ dissect_rtcp_xr(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tree, offset += 4; /* Begin Seq */ - begin = tvb_get_ntohs(tvb, offset); proto_tree_add_item(content_tree, hf_rtcp_xr_beginseq, tvb, offset, 2, FALSE); offset += 2; diff --git a/epan/dissectors/packet-rtmpt.c b/epan/dissectors/packet-rtmpt.c index 11b06e3a05..9c65a52b3a 100644 --- a/epan/dissectors/packet-rtmpt.c +++ b/epan/dissectors/packet-rtmpt.c @@ -1050,15 +1050,9 @@ dissect_rtmpt_body_aggregate(tvbuff_t *tvb, gint offset, proto_tree *rtmpt_tree) while (tvb_length_remaining(tvb, offset) > 0) { guint8 iTagType = 0; guint iDataSize = 0; - guint iTimestamp = 0; - guint8 iETS = 0; - guint iStreamID = 0; iTagType = tvb_get_guint8(tvb, offset + 0); iDataSize = tvb_get_ntoh24(tvb, offset + 1); - iTimestamp = tvb_get_ntoh24(tvb, offset + 4); - iETS = tvb_get_guint8(tvb, offset + 7); - iStreamID = tvb_get_ntoh24(tvb, offset + 8); tag_item = proto_tree_add_text(rtmpt_tree, tvb, offset, 11+iDataSize+4, "%s", val_to_str(iTagType, rtmpt_tag_vals, "Unknown Tag")); tag_tree = proto_item_add_subtree(tag_item, ett_rtmpt_tag); diff --git a/epan/dissectors/packet-rtps.c b/epan/dissectors/packet-rtps.c index ae391dff65..3de78e922b 100644 --- a/epan/dissectors/packet-rtps.c +++ b/epan/dissectors/packet-rtps.c @@ -764,11 +764,6 @@ static void rtps_util_add_protocol_version(proto_tree *tree, /* Can NOT be NULL gint offset) { proto_item * ti; proto_tree * version_tree; - guint8 major = 0; - guint8 minor = 0; - - major = tvb_get_guint8(tvb, offset); - minor = tvb_get_guint8(tvb, offset+1); ti = proto_tree_add_none_format(tree, hf_rtps_protocol_version, @@ -995,7 +990,7 @@ static void rtps_util_add_locator_list(proto_tree *tree, for (i = 0; i < num_locators; ++i) { g_snprintf(temp_buff, 20, "Locator[%d]", i); - rtps_util_add_locator_t(tree, + rtps_util_add_locator_t(locator_tree, tvb, offset + 4 + (i * 24), little_endian, @@ -2111,7 +2106,7 @@ static gint rtps_util_add_typecode(proto_tree *tree, gint8 * struct_name; const char * discriminator_name = "<unknown>"; /* for unions */ char * discriminator_enum_name = NULL; /* for unions with enum discriminator */ - guint32 defaultIdx; /* Currently is ignored */ + /*guint32 defaultIdx;*/ /* Currently is ignored */ guint32 disc_id; /* Used temporarily to populate 'discriminator_name' */ guint16 disc_size; /* Currently is ignored */ guint32 disc_offset_begin; @@ -2139,7 +2134,7 @@ static gint rtps_util_add_typecode(proto_tree *tree, /* - - - - - - - Default index - - - - - - - */ LONG_ALIGN(offset); - defaultIdx = NEXT_guint32(tvb, offset, little_endian); + /*defaultIdx = NEXT_guint32(tvb, offset, little_endian);*/ offset += 4; /* - - - - - - - Discriminator type code - - - - - - - */ diff --git a/epan/dissectors/packet-rtps2.c b/epan/dissectors/packet-rtps2.c index 6db7525dcb..52269c0bb5 100644 --- a/epan/dissectors/packet-rtps2.c +++ b/epan/dissectors/packet-rtps2.c @@ -1015,11 +1015,6 @@ static void rtps_util_add_protocol_version(proto_tree *tree, if (tree) { proto_item * ti; proto_tree * version_tree; - guint8 major = 0; - guint8 minor = 0; - - major = tvb_get_guint8(tvb, offset); - minor = tvb_get_guint8(tvb, offset+1); ti = proto_tree_add_none_format(tree, hf_rtps_protocol_version, @@ -2408,7 +2403,7 @@ static gint rtps_util_add_typecode(proto_tree *tree, gint8 * struct_name; const char * discriminator_name = "<unknown>"; /* for unions */ char * discriminator_enum_name = NULL; /* for unions with enum discriminator */ - guint32 defaultIdx; /* Currently is ignored */ + /*guint32 defaultIdx;*/ /* Currently is ignored */ guint32 disc_id; /* Used temporarily to populate 'discriminator_name' */ guint16 disc_size; /* Currently is ignored */ guint32 disc_offset_begin; @@ -2436,7 +2431,7 @@ static gint rtps_util_add_typecode(proto_tree *tree, /* - - - - - - - Default index - - - - - - - */ LONG_ALIGN(offset); - defaultIdx = NEXT_guint32(tvb, offset, little_endian); + /*defaultIdx = NEXT_guint32(tvb, offset, little_endian);*/ offset += 4; /* - - - - - - - Discriminator type code - - - - - - - */ @@ -2646,16 +2641,16 @@ static gint rtps_util_add_typecode(proto_tree *tree, if (tk_id == RTI_CDR_TK_ENUM) { typecode_name = "enum"; } else if (tk_id == RTI_CDR_TK_VALUE_PARARM) { - guint16 type_modifier; - guint32 baseTypeCodeKind; + /*guint16 type_modifier;*/ + /*guint32 baseTypeCodeKind;*/ guint32 baseTypeCodeLength; /* Need to read the type modifier and the base type code */ typecode_name = "<sparse type>"; SHORT_ALIGN(offset); - type_modifier = NEXT_guint16(tvb, offset, little_endian); + /*type_modifier = NEXT_guint16(tvb, offset, little_endian);*/ offset += 2; LONG_ALIGN(offset); - baseTypeCodeKind = NEXT_guint32(tvb, offset, little_endian); + /*baseTypeCodeKind = NEXT_guint32(tvb, offset, little_endian);*/ offset += 4; baseTypeCodeLength = NEXT_guint32(tvb, offset, little_endian); offset += 4; @@ -7682,7 +7677,7 @@ static void dissect_RTPS_DATA(tvbuff_t *tvb, guint32 kind; guint16 encapsulation_id; guint16 encapsulation_len; - int encapsulation_little_endian = 0; + /*int encapsulation_little_endian = 0;*/ proto_item * ti = proto_tree_add_text(tree, tvb, offset, @@ -7702,11 +7697,13 @@ static void dissect_RTPS_DATA(tvbuff_t *tvb, encapsulation_id_vals, "unknown (%02x)")); offset += 2; +#if 0 /* XXX: encapsulation_little_endian not actually used anywhere ?? */ /* Sets the correct values for encapsulation_le */ if (encapsulation_id == ENCAPSULATION_CDR_LE || encapsulation_id == ENCAPSULATION_PL_CDR_LE) { encapsulation_little_endian = 1; } +#endif /* Encapsulation length (or option) */ encapsulation_len = NEXT_guint16(tvb, offset, 0); /* Always big endian */ @@ -8091,7 +8088,7 @@ static void dissect_RTPS_DATA_BATCH(tvbuff_t *tvb, guint32 wid; /* Writer EntityID */ guint32 status_info = 0xffffffff; gint32 octectsToSLEncapsulationId; - guint32 batchSampleCount; + /*guint32 batchSampleCount;*/ gint32 sampleListOffset; guint16 encapsulation_id; guint16 *sample_info_flags = NULL; @@ -8221,7 +8218,7 @@ static void dissect_RTPS_DATA_BATCH(tvbuff_t *tvb, offset += 4; /* batchSampleCount */ - batchSampleCount = rtps_util_add_long(tree, + /*batchSampleCount =*/ rtps_util_add_long(tree, tvb, offset, -1, @@ -8286,7 +8283,7 @@ static void dissect_RTPS_DATA_BATCH(tvbuff_t *tvb, * is greater or equal than 'sampleListOffset' */ while (offset < sampleListOffset) { guint16 flags2; - guint16 octetsToInlineQos; + /*guint16 octetsToInlineQos;*/ gint min_length; proto_tree * si_tree; gint offset_begin_sampleinfo = offset; @@ -8312,7 +8309,7 @@ static void dissect_RTPS_DATA_BATCH(tvbuff_t *tvb, sample_info_flags[sample_info_count] = flags2; rtps_util_decode_flags_16bit(si_tree, tvb, offset, flags2, RTPS_SAMPLE_INFO_FLAGS16); offset += 2; - octetsToInlineQos = rtps_util_add_short(si_tree, + /*octetsToInlineQos =*/ rtps_util_add_short(si_tree, tvb, offset, -1, |