From 2a0a29c5442de777ec68dbb48cab534d71921649 Mon Sep 17 00:00:00 2001 From: Alexis La Goutte Date: Fri, 19 Jun 2020 15:45:55 +0000 Subject: [PATCH] rtps: Fix Dead Store Fix dead store (Dead assignement/Dead increment) Warning found by Clang Change-Id: Ieda68cc1518325c64c8862a77f16cee5de7def8b Reviewed-on: https://code.wireshark.org/review/37519 Petri-Dish: Anders Broman Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- epan/dissectors/packet-rtps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epan/dissectors/packet-rtps.c b/epan/dissectors/packet-rtps.c index 794cf4b365..0a1f964dc6 100644 --- a/epan/dissectors/packet-rtps.c +++ b/epan/dissectors/packet-rtps.c @@ -3511,7 +3511,7 @@ static gint rtps_util_add_type_id(proto_tree *tree, offset += 2; if (short_number <= 13) { - ti = proto_tree_add_item(tree, hf_type, tvb, offset, 2, encoding); + proto_tree_add_item(tree, hf_type, tvb, offset, 2, encoding); if (append_info_item) { proto_item_append_text(append_info_item, "(%s)", val_to_str(short_number, type_object_kind, "(0x%016x)")); @@ -3520,7 +3520,7 @@ static gint rtps_util_add_type_id(proto_tree *tree, } else { ALIGN_ZERO(offset, 8, zero); longlong_number = tvb_get_guint64(tvb, offset, encoding); - ti = proto_tree_add_item(tree, hf_type, tvb, offset, 8, encoding); + proto_tree_add_item(tree, hf_type, tvb, offset, 8, encoding); if (append_info_item) { proto_item_append_text(append_info_item, "(0x%016" G_GINT64_MODIFIER "x)", longlong_number); }