aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralagoutte <alagoutte@f5534014-38df-0310-8fa8-9805f1628bb7>2012-02-06 22:13:32 +0000
committeralagoutte <alagoutte@f5534014-38df-0310-8fa8-9805f1628bb7>2012-02-06 22:13:32 +0000
commit691f3015e583da2811ea48366fb0a02afeae5ac8 (patch)
tree8c42483d1903532e89b4aed08302d9aa69499c41
parent5b22308c4798303abe95f0d2497dc568b614258c (diff)
Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@40900 f5534014-38df-0310-8fa8-9805f1628bb7
-rw-r--r--epan/dissectors/packet-btl2cap.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/epan/dissectors/packet-btl2cap.c b/epan/dissectors/packet-btl2cap.c
index 76c64ae17c..dba143cbf8 100644
--- a/epan/dissectors/packet-btl2cap.c
+++ b/epan/dissectors/packet-btl2cap.c
@@ -928,7 +928,7 @@ dissect_disconnrequestresponse(tvbuff_t *tvb, int offset, packet_info *pinfo _U_
return offset;
}
-static void
+static int
dissect_b_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree *btl2cap_tree, guint16 psm, gboolean local_service, guint16 length, int offset)
{
tvbuff_t *next_tvb;
@@ -964,6 +964,7 @@ dissect_b_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree
proto_tree_add_item(btl2cap_tree, hf_btl2cap_payload, tvb, offset, length, ENC_NA);
offset+=tvb_length_remaining(tvb, offset);
}
+ return offset;
}
typedef struct _sdu_reassembly_t
@@ -976,7 +977,7 @@ typedef struct _sdu_reassembly_t
int cur_off; /* counter used by reassembly */
} sdu_reassembly_t;
-static void
+static int
dissect_i_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree *btl2cap_tree, psm_data_t *psm_data, guint16 length, int offset, config_data_t *config_data)
{
tvbuff_t *next_tvb = NULL;
@@ -1111,9 +1112,10 @@ dissect_i_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree
offset+=(tvb_length_remaining(tvb, offset) - 2);
proto_tree_add_item(btl2cap_tree, hf_btl2cap_fcs, tvb, offset, 2, ENC_LITTLE_ENDIAN);
offset += 2;
+ return offset;
}
-static void
+static int
dissect_s_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree _U_, proto_tree *btl2cap_tree, guint16 psm _U_, guint16 length _U_, int offset, config_data_t *config_data _U_)
{
proto_item* ti_control;
@@ -1146,6 +1148,7 @@ dissect_s_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree _U_, proto_t
offset += 2;
proto_tree_add_item(ti_control_subtree, hf_btl2cap_fcs, tvb, offset, 2, ENC_LITTLE_ENDIAN);
offset += 2;
+ return offset;
}
/* Code to actually dissect the packets
@@ -1336,7 +1339,6 @@ dissect_btl2cap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item(btl2cap_tree, hf_btl2cap_payload, tvb, offset, length, ENC_NA);
}
}
- offset+=tvb_length_remaining(tvb, offset);
}
else if(cid < BTL2CAP_FIXED_CID_MAX) {
if (cid == BTL2CAP_FIXED_CID_AMP_MAN) {