From a446328fcffde1b7d8d1d93f0741359df0983606 Mon Sep 17 00:00:00 2001 From: alagoutte Date: Tue, 18 Oct 2011 23:21:15 +0000 Subject: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang packet-btamp.c:xxx:y: warning: Value stored to 'offset' is never read (x14) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39463 f5534014-38df-0310-8fa8-9805f1628bb7 --- epan/dissectors/packet-btamp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'epan/dissectors/packet-btamp.c') diff --git a/epan/dissectors/packet-btamp.c b/epan/dissectors/packet-btamp.c index dd34161095..5a2b06ac0d 100644 --- a/epan/dissectors/packet-btamp.c +++ b/epan/dissectors/packet-btamp.c @@ -377,7 +377,7 @@ dissect_discphysicalchanresponse(tvbuff_t *tvb, int offset, packet_info *pinfo _ return offset; } -static void dissect_btamp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int dissect_btamp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { int offset=0; proto_item *ti=NULL; @@ -494,6 +494,7 @@ static void dissect_btamp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_item_append_text(ti_command, "%s", val_to_str(cmd_code, command_code_vals, "Unknown PDU (%u)")); col_append_str(pinfo->cinfo, COL_INFO, val_to_str(cmd_code, command_code_vals, "Unknown PDU (%u)")); +return offset; } /* Register the protocol with Wireshark */ @@ -641,7 +642,7 @@ proto_register_btamp(void) /* Register the protocol name and description */ proto_btamp = proto_register_protocol("Bluetooth AMP Packet", "AMP", "btamp"); - register_dissector("btamp", dissect_btamp, proto_btamp); + new_register_dissector("btamp", dissect_btamp, proto_btamp); /* Required function calls to register the header fields and subtrees used */ proto_register_field_array(proto_btamp, hf, array_length(hf)); -- cgit v1.2.3