forked from osmocom/wireshark
Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Use 2-space indenting svn path=/trunk/; revision=37712
This commit is contained in:
parent
36972d9cda
commit
fab566d69f
|
@ -44,6 +44,7 @@
|
||||||
#include "packet-tcp.h"
|
#include "packet-tcp.h"
|
||||||
#include <epan/prefs.h>
|
#include <epan/prefs.h>
|
||||||
#include <epan/strutil.h>
|
#include <epan/strutil.h>
|
||||||
|
#include <epan/expert.h>
|
||||||
|
|
||||||
/* Initialize the protocol and registered fields */
|
/* Initialize the protocol and registered fields */
|
||||||
static int proto_slsk = -1;
|
static int proto_slsk = -1;
|
||||||
|
@ -305,7 +306,7 @@ static void dissect_slsk_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
|
||||||
{
|
{
|
||||||
|
|
||||||
/* Set up structures needed to add the protocol subtree and manage it */
|
/* Set up structures needed to add the protocol subtree and manage it */
|
||||||
proto_item *ti;
|
proto_item *ti, *ti_len=NULL;
|
||||||
proto_tree *slsk_tree;
|
proto_tree *slsk_tree;
|
||||||
|
|
||||||
int offset, i, j;
|
int offset, i, j;
|
||||||
|
@ -347,7 +348,7 @@ static void dissect_slsk_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
|
||||||
|
|
||||||
/* Continue adding tree items to process the packet here */
|
/* Continue adding tree items to process the packet here */
|
||||||
|
|
||||||
proto_tree_add_uint(slsk_tree, hf_slsk_message_length, tvb, offset, 4, msg_len);
|
ti_len = proto_tree_add_uint(slsk_tree, hf_slsk_message_length, tvb, offset, 4, msg_len);
|
||||||
offset += 4;
|
offset += 4;
|
||||||
|
|
||||||
switch (msg_code) {
|
switch (msg_code) {
|
||||||
|
@ -728,7 +729,6 @@ static void dissect_slsk_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
|
||||||
uncompr_tvb_offset += 4;
|
uncompr_tvb_offset += 4;
|
||||||
proto_tree_add_uint_format(slsk_compr_packet_tree, hf_slsk_integer, uncompr_tvb, uncompr_tvb_offset, 4, tvb_get_letohl(uncompr_tvb, uncompr_tvb_offset),
|
proto_tree_add_uint_format(slsk_compr_packet_tree, hf_slsk_integer, uncompr_tvb, uncompr_tvb_offset, 4, tvb_get_letohl(uncompr_tvb, uncompr_tvb_offset),
|
||||||
"In Queue: %d", tvb_get_letohl(uncompr_tvb, uncompr_tvb_offset));
|
"In Queue: %d", tvb_get_letohl(uncompr_tvb, uncompr_tvb_offset));
|
||||||
uncompr_tvb_offset += 4;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
|
@ -2382,6 +2382,9 @@ static void dissect_slsk_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
if(offset < (int)msg_len){
|
||||||
|
expert_add_info_format(pinfo, ti_len, PI_UNDECODED, PI_WARN, "Unknown Data (not interpreted)");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue