From d05b6f9682523a04a26e385f62d382937a4bf9bc Mon Sep 17 00:00:00 2001 From: Alexis La Goutte Date: Wed, 19 Aug 2015 11:52:51 +0200 Subject: [PATCH] Bluetooth: ATT: Fix Dead Store (Dead assignement/Dead increment) warning found by Clang Found also by Coverity (CID 1316607) Change-Id: Ib6a4437fd24b51a8aa87d4bcdb5ee2a1dc43dae3 Reviewed-on: https://code.wireshark.org/review/10124 Reviewed-by: Michal Labedzki --- epan/dissectors/packet-btatt.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/epan/dissectors/packet-btatt.c b/epan/dissectors/packet-btatt.c index 8a97501739..499e603ed5 100644 --- a/epan/dissectors/packet-btatt.c +++ b/epan/dissectors/packet-btatt.c @@ -3064,22 +3064,22 @@ dissect_attribute_value(proto_tree *tree, proto_item *patron_item, packet_info * sub_item = proto_tree_add_item(tree, hf_btatt_blood_pressure_measurement_timestamp, tvb, offset, 7, ENC_NA); sub_tree = proto_item_add_subtree(sub_item, ett_btatt_list); - proto_tree_add_item(tree, hf_btatt_year, tvb, offset, 2, ENC_LITTLE_ENDIAN); + proto_tree_add_item(sub_tree, hf_btatt_year, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset += 2; - proto_tree_add_item(tree, hf_btatt_month, tvb, offset, 1, ENC_NA); + proto_tree_add_item(sub_tree, hf_btatt_month, tvb, offset, 1, ENC_NA); offset += 1; - proto_tree_add_item(tree, hf_btatt_day, tvb, offset, 1, ENC_NA); + proto_tree_add_item(sub_tree, hf_btatt_day, tvb, offset, 1, ENC_NA); offset += 1; - proto_tree_add_item(tree, hf_btatt_hours, tvb, offset, 1, ENC_NA); + proto_tree_add_item(sub_tree, hf_btatt_hours, tvb, offset, 1, ENC_NA); offset += 1; - proto_tree_add_item(tree, hf_btatt_minutes, tvb, offset, 1, ENC_NA); + proto_tree_add_item(sub_tree, hf_btatt_minutes, tvb, offset, 1, ENC_NA); offset += 1; - proto_tree_add_item(tree, hf_btatt_seconds, tvb, offset, 1, ENC_NA); + proto_tree_add_item(sub_tree, hf_btatt_seconds, tvb, offset, 1, ENC_NA); offset += 1; }