diff options
author | alagoutte <alagoutte@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-10-19 21:55:08 +0000 |
---|---|---|
committer | alagoutte <alagoutte@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-10-19 21:55:08 +0000 |
commit | 68b68542b67a3ac48661451c7f9aca2dc86878b1 (patch) | |
tree | 3da30010c9df2fff0051e28a2133423cac275eb3 /epan | |
parent | d3e3bf52d08fb04f95d27d7057524aad3f713ed3 (diff) |
Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39481 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-bthci_cmd.c | 18 | ||||
-rw-r--r-- | epan/dissectors/packet-bthci_evt.c | 6 |
2 files changed, 16 insertions, 8 deletions
diff --git a/epan/dissectors/packet-bthci_cmd.c b/epan/dissectors/packet-bthci_cmd.c index 8bb0b35298..94d55ba7aa 100644 --- a/epan/dissectors/packet-bthci_cmd.c +++ b/epan/dissectors/packet-bthci_cmd.c @@ -949,7 +949,7 @@ dissect_bthci_ext_inquiry_response(tvbuff_t *tvb, int offset, packet_info *pinfo return offset+240; } -static void +static int dissect_link_control_cmd(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, guint16 cmd_ocf) { proto_item *item; @@ -1228,9 +1228,10 @@ dissect_link_control_cmd(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, prot offset+=tvb_length_remaining(tvb, offset); break; } +return offset; } -static void +static int dissect_link_policy_cmd(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, guint16 cmd_ocf) { proto_item *item; @@ -1369,9 +1370,10 @@ dissect_link_policy_cmd(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto break; } +return offset; } -static void +static int dissect_host_controller_baseband_cmd(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, guint16 cmd_ocf) { @@ -1802,9 +1804,10 @@ dissect_host_controller_baseband_cmd(tvbuff_t *tvb, int offset, packet_info *pin break; } +return offset; } -static void +static int dissect_informational_parameters_cmd(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, guint16 cmd_ocf) { @@ -1821,9 +1824,10 @@ dissect_informational_parameters_cmd(tvbuff_t *tvb, int offset, packet_info *pin break; } +return offset; } -static void +static int dissect_status_parameters_cmd(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, guint16 cmd_ocf) { @@ -1851,9 +1855,10 @@ dissect_status_parameters_cmd(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, break; } +return offset; } -static void +static int dissect_testing_cmd(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, guint16 cmd_ocf) { switch(cmd_ocf) { @@ -1874,6 +1879,7 @@ dissect_testing_cmd(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tre break; } +return offset; } /* Code to actually dissect the packets */ diff --git a/epan/dissectors/packet-bthci_evt.c b/epan/dissectors/packet-bthci_evt.c index d29ff5da65..9dd780f02e 100644 --- a/epan/dissectors/packet-bthci_evt.c +++ b/epan/dissectors/packet-bthci_evt.c @@ -2302,7 +2302,7 @@ dissect_bthci_evt_inq_result(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, /* Code to actually dissect the packets */ -static void +static int dissect_bthci_evt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { proto_item *ti; @@ -2538,10 +2538,12 @@ dissect_bthci_evt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) default: proto_tree_add_item(bthci_evt_tree, hf_bthci_evt_params, tvb, 2, -1, ENC_NA); + offset+=tvb_length_remaining(tvb, offset); break; } } +return offset; } @@ -3520,7 +3522,7 @@ proto_register_bthci_evt(void) proto_bthci_evt = proto_register_protocol("Bluetooth HCI Event", "HCI_EVT", "bthci_evt"); - register_dissector("bthci_evt", dissect_bthci_evt, proto_bthci_evt); + new_register_dissector("bthci_evt", dissect_bthci_evt, proto_bthci_evt); |