forked from osmocom/wireshark
Fix some "warning: Value stored to '...' is never read" clang scan-build warnings.
Also; Do some whitespace cleanup in a few cases. svn path=/trunk/; revision=42715
This commit is contained in:
parent
63d6b6bf2a
commit
91e5923458
|
@ -1508,7 +1508,7 @@ dissect_acn_dmp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int off
|
|||
case ACN_DMP_VECTOR_ALLOCATE_MAP_REPLY:
|
||||
/* Single reason code */
|
||||
proto_tree_add_item(pdu_tree, hf_acn_dmp_reason_code, tvb, data_offset, 1, ENC_BIG_ENDIAN);
|
||||
data_offset += 1;
|
||||
/* data_offset += 1; */
|
||||
case ACN_DMP_VECTOR_DEALLOCATE_MAP:
|
||||
/* No data for this */
|
||||
break;
|
||||
|
@ -2480,7 +2480,7 @@ dissect_acn_sdt_base_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, in
|
|||
proto_tree_add_item(pdu_tree, hf_acn_reliable_sequence_number, tvb, data_offset, 4, ENC_BIG_ENDIAN);
|
||||
data_offset += 4;
|
||||
proto_tree_add_item(pdu_tree, hf_acn_reason_code, tvb, data_offset, 1, ENC_BIG_ENDIAN);
|
||||
offset += 1;
|
||||
/* offset += 1; */
|
||||
break;
|
||||
case ACN_SDT_VECTOR_CONNECT:
|
||||
break;
|
||||
|
|
|
@ -1064,7 +1064,7 @@ spotlight_get_utf16_string_encoding(tvbuff_t *tvb, gint offset, gint query_lengt
|
|||
byte_order_mark = tvb_get_letohs(tvb, offset);
|
||||
else
|
||||
byte_order_mark = tvb_get_ntohs(tvb, offset);
|
||||
|
||||
|
||||
if (byte_order_mark == 0xFFFE) {
|
||||
utf16_encoding = ENC_BIG_ENDIAN | ENC_UTF_16;
|
||||
}
|
||||
|
@ -4227,20 +4227,20 @@ spotlight_dissect_query_loop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
|
|||
* However the existence of such a mark can not be assumed.
|
||||
* If the mark is missing, big endian encoding is assumed.
|
||||
*/
|
||||
|
||||
|
||||
subquery_count = 1;
|
||||
query_data64 = spotlight_ntoh64(tvb, offset + 8, encoding);
|
||||
query_length = (query_data64 & 0xffff) * 8;
|
||||
|
||||
|
||||
unicode_encoding = spotlight_get_utf16_string_encoding(tvb, offset + 16, query_length - 8, encoding);
|
||||
mark_exists = (unicode_encoding & ENC_UTF_16);
|
||||
unicode_encoding &= ~ENC_UTF_16;
|
||||
|
||||
|
||||
item_query = proto_tree_add_text(tree, tvb, offset, query_length + 8,
|
||||
"%s, toc index: %u, utf-16 string: '%s'",
|
||||
spotlight_get_cpx_qtype_string(complex_query_type),
|
||||
toc_index + 1,
|
||||
tvb_get_ephemeral_unicode_string(tvb, offset + (mark_exists ? 18 : 16),
|
||||
tvb_get_ephemeral_unicode_string(tvb, offset + (mark_exists ? 18 : 16),
|
||||
query_length - (mark_exists? 10 : 8), unicode_encoding));
|
||||
break;
|
||||
default:
|
||||
|
@ -4317,13 +4317,13 @@ spotlight_dissect_query_loop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
|
|||
unicode_encoding &= ~ENC_UTF_16;
|
||||
|
||||
proto_tree_add_text(tree, tvb, offset, query_length, "utf-16 string: '%s'",
|
||||
tvb_get_ephemeral_unicode_string(tvb, offset + (mark_exists ? 10 : 8),
|
||||
tvb_get_ephemeral_unicode_string(tvb, offset + (mark_exists ? 10 : 8),
|
||||
query_length - (mark_exists? 10 : 8), unicode_encoding));
|
||||
break;
|
||||
}
|
||||
case SQ_CPX_TYPE_FILEMETA:
|
||||
if (query_length <= 8) {
|
||||
item_query = proto_tree_add_text(tree, tvb, offset, query_length, "filemeta (empty)");
|
||||
/* item_query = */ proto_tree_add_text(tree, tvb, offset, query_length, "filemeta (empty)");
|
||||
} else {
|
||||
item_query = proto_tree_add_text(tree, tvb, offset, query_length, "filemeta");
|
||||
sub_tree = proto_item_add_subtree(item_query, ett_afp_spotlight_query_line);
|
||||
|
@ -4336,7 +4336,7 @@ spotlight_dissect_query_loop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
|
|||
break;
|
||||
case SQ_TYPE_CNIDS:
|
||||
if (query_length <= 8) {
|
||||
item_query = proto_tree_add_text(tree, tvb, offset, query_length, "CNID Array (empty)");
|
||||
/* item_query = */ proto_tree_add_text(tree, tvb, offset, query_length, "CNID Array (empty)");
|
||||
} else {
|
||||
item_query = proto_tree_add_text(tree, tvb, offset, query_length, "CNID Array");
|
||||
sub_tree = proto_item_add_subtree(item_query, ett_afp_spotlight_query_line);
|
||||
|
@ -4494,7 +4494,7 @@ dissect_spotlight(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint offs
|
|||
toc_entry >> 32,
|
||||
spotlight_get_cpx_qtype_string((toc_entry & 0xffff0000) >> 16),
|
||||
(toc_entry & 0xffff) * 8);
|
||||
} else if ((((toc_entry & 0xffff0000) >> 16) == SQ_CPX_TYPE_STRING)
|
||||
} else if ((((toc_entry & 0xffff0000) >> 16) == SQ_CPX_TYPE_STRING)
|
||||
|| (((toc_entry & 0xffff0000) >> 16) == SQ_CPX_TYPE_UTF16_STRING)) {
|
||||
proto_tree_add_text(sub_tree_toc,
|
||||
tvb,
|
||||
|
@ -4750,7 +4750,7 @@ dissect_reply_afp_spotlight(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
case SPOTLIGHT_CMD_GET_VOLPATH:
|
||||
proto_tree_add_item(tree, hf_afp_vol_id, tvb, offset, 4, ENC_BIG_ENDIAN);
|
||||
offset += 4;
|
||||
|
||||
|
||||
proto_tree_add_item(tree, hf_afp_spotlight_reply_reserved, tvb, offset, 4, ENC_BIG_ENDIAN);
|
||||
offset += 4;
|
||||
|
||||
|
@ -6673,7 +6673,7 @@ proto_register_afp(void)
|
|||
{ "Padding", "afp.spotlight.reserved",
|
||||
FT_UINT32, BASE_HEX, NULL, 0x0,
|
||||
"Spotlight RPC Padding", HFILL }},
|
||||
|
||||
|
||||
{ &hf_afp_spotlight_reply_reserved,
|
||||
{ "Reserved", "afp.spotlight.reserved",
|
||||
FT_UINT32, BASE_HEX, NULL, 0x0,
|
||||
|
|
|
@ -2018,7 +2018,7 @@ dissect_fs_request(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int o
|
|||
break;
|
||||
case 134: /* Store ACL */
|
||||
OUT_FS_AFSFid("Target");
|
||||
offset = dissect_acl(tvb, rxinfo, tree, offset);
|
||||
/* offset = */ dissect_acl(tvb, rxinfo, tree, offset);
|
||||
break;
|
||||
case 135: /* Store Status */
|
||||
OUT_FS_AFSFid("Target");
|
||||
|
@ -3076,9 +3076,9 @@ dissect_backup_reply(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int
|
|||
}
|
||||
|
||||
static void
|
||||
dissect_backup_request(tvbuff_t *tvb _U_, struct rxinfo *rxinfo _U_, proto_tree *tree _U_, int offset, int opcode)
|
||||
dissect_backup_request(tvbuff_t *tvb _U_, struct rxinfo *rxinfo _U_, proto_tree *tree _U_, int offset _U_, int opcode)
|
||||
{
|
||||
offset += 4; /* skip the opcode */
|
||||
/* offset += 4; */ /* skip the opcode */
|
||||
|
||||
switch ( opcode )
|
||||
{
|
||||
|
|
|
@ -364,7 +364,7 @@ dissect_aim_msg_incoming(tvbuff_t *tvb, packet_info *pinfo, proto_tree *msg_tree
|
|||
|
||||
/* Message Channel ID */
|
||||
proto_tree_add_item(msg_tree, hf_aim_message_channel_id, tvb, offset, 2,
|
||||
ENC_BIG_ENDIAN);
|
||||
ENC_BIG_ENDIAN);
|
||||
channel_id = tvb_get_ntohs(tvb, offset);
|
||||
offset += 2;
|
||||
|
||||
|
@ -506,7 +506,8 @@ dissect_aim_rendezvous_extended_message(tvbuff_t *tvb, proto_tree *msg_tree)
|
|||
text_length = tvb_get_letohs(tvb, offset);
|
||||
proto_tree_add_item(msg_tree, hf_aim_rendezvous_extended_data_message_text_length, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2;
|
||||
text = tvb_get_ephemeral_string(tvb, offset, text_length);
|
||||
proto_tree_add_text(msg_tree, tvb, offset, text_length, "Text: %s", text); offset+=text_length;
|
||||
proto_tree_add_text(msg_tree, tvb, offset, text_length, "Text: %s", text); /* offset+=text_length; */
|
||||
|
||||
offset = tvb_length(tvb);
|
||||
|
||||
return offset;
|
||||
|
@ -549,7 +550,7 @@ dissect_aim_tlv_value_extended_data(proto_item *ti, guint16 valueid _U_, tvbuff_
|
|||
proto_tree_add_text(entry, tvb, offset, 2, "Unknown"); offset += 2;
|
||||
proto_tree_add_item(entry, hf_aim_icbm_client_err_client_caps_flags, tvb, offset, 4, ENC_BIG_ENDIAN); offset+=4;
|
||||
proto_tree_add_text(entry, tvb, offset, 1, "Unknown"); offset += 1;
|
||||
proto_tree_add_text(entry, tvb, offset, 2, "Downcounter?"); offset += 2;
|
||||
proto_tree_add_text(entry, tvb, offset, 2, "Downcounter?"); /* offset += 2;*/
|
||||
|
||||
offset = start_offset + length;
|
||||
|
||||
|
@ -564,7 +565,7 @@ dissect_aim_tlv_value_extended_data(proto_item *ti, guint16 valueid _U_, tvbuff_
|
|||
{
|
||||
/* a message follows */
|
||||
tvbuff_t *subtvb = tvb_new_subset_remaining(tvb, offset);
|
||||
offset += dissect_aim_rendezvous_extended_message(subtvb, entry);
|
||||
/* offset += */ dissect_aim_rendezvous_extended_message(subtvb, entry);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -584,7 +585,7 @@ dissect_aim_msg_ack(tvbuff_t *tvb, packet_info *pinfo, proto_tree *msg_tree)
|
|||
proto_tree_add_item(msg_tree,hf_aim_icbm_cookie, tvb, offset, 8, ENC_NA); offset+=8;
|
||||
|
||||
proto_tree_add_item(msg_tree, hf_aim_message_channel_id, tvb, offset, 2,
|
||||
ENC_BIG_ENDIAN); offset += 2;
|
||||
ENC_BIG_ENDIAN); offset += 2;
|
||||
|
||||
offset = dissect_aim_buddyname(tvb, pinfo, offset, msg_tree);
|
||||
|
||||
|
|
|
@ -1526,8 +1526,6 @@ for_param_block_val_spasm(tvbuff_t *tvb, proto_tree *tree, guint len, guint32 of
|
|||
tvb, offset, 1,
|
||||
"%s : Reserved",
|
||||
bigbuf);
|
||||
|
||||
offset++;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1561,8 +1559,6 @@ for_param_block_val_spasm(tvbuff_t *tvb, proto_tree *tree, guint len, guint32 of
|
|||
tvb, offset, 3,
|
||||
"%s : Reserved",
|
||||
bigbuf);
|
||||
|
||||
offset += 3;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5305,7 +5305,6 @@ elem_adds_user_part(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, gui
|
|||
proto_item *item;
|
||||
|
||||
curr_offset = offset;
|
||||
adds_app = 0;
|
||||
|
||||
oct = tvb_get_guint8(tvb, curr_offset);
|
||||
|
||||
|
@ -8973,7 +8972,6 @@ elem_v(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, elem_idx_t idx, guin
|
|||
gint dec_idx;
|
||||
|
||||
curr_offset = offset;
|
||||
consumed = 0;
|
||||
|
||||
if ((int)idx < 0 || idx >= ansi_a_elem_1_max-1)
|
||||
{
|
||||
|
@ -11794,7 +11792,6 @@ dissect_dtap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
/*
|
||||
* add DTAP message name
|
||||
*/
|
||||
saved_offset = offset;
|
||||
oct = tvb_get_guint8(tvb, offset++);
|
||||
|
||||
msg_str = my_match_strval_idx((guint32) oct, ansi_a_dtap_strings, &idx, &dec_idx);
|
||||
|
|
Loading…
Reference in New Issue