diff options
author | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2019-11-09 21:55:11 +0100 |
---|---|---|
committer | Dario Lombardo <lomato@gmail.com> | 2019-11-09 22:15:01 +0000 |
commit | 8b6f316f304ce058af5ef74e87a59f907e521af6 (patch) | |
tree | f1d19fe87f3c5e25047bdf9edd7b49b694aa6f7b | |
parent | 2d47c2060b20e18e34423152267c46217691f7f0 (diff) |
cemi: Fix Dead Store
Fix dead store (Dead assignement/Dead increment) Warning found by Clang
Change-Id: I4524d104b4f2c59694c59d2061ba0763659e1f0f
Reviewed-on: https://code.wireshark.org/review/35034
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
-rw-r--r-- | epan/dissectors/packet-cemi.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/epan/dissectors/packet-cemi.c b/epan/dissectors/packet-cemi.c index d8ff9e9bc7..0a70d6ab50 100644 --- a/epan/dissectors/packet-cemi.c +++ b/epan/dissectors/packet-cemi.c @@ -1213,7 +1213,7 @@ static guint8 dissect_ox( tvbuff_t *tvb, packet_info *pinfo, proto_item *node, p return ox; } - node = proto_tree_add_expert_format( list, pinfo, KIP_ERROR, tvb, offset, 0, "? Object Index: expected 1 byte" ); + proto_tree_add_expert_format( list, pinfo, KIP_ERROR, tvb, offset, 0, "? Object Index: expected 1 byte" ); if( p_error ) { @@ -1287,7 +1287,7 @@ static guint8 dissect_pid( tvbuff_t *tvb, packet_info *pinfo, proto_item *node, return pid; } - node = proto_tree_add_expert_format( list, pinfo, KIP_ERROR, tvb, offset, 0, "? Property ID: expected 1 byte" ); + proto_tree_add_expert_format( list, pinfo, KIP_ERROR, tvb, offset, 0, "? Property ID: expected 1 byte" ); if( p_error ) { @@ -1320,7 +1320,7 @@ static guint8 dissect_px( tvbuff_t *tvb, packet_info *pinfo, proto_item *node, p return px; } - node = proto_tree_add_expert_format( list, pinfo, KIP_ERROR, tvb, offset, 0, "? Property Index: expected 1 byte" ); + proto_tree_add_expert_format( list, pinfo, KIP_ERROR, tvb, offset, 0, "? Property Index: expected 1 byte" ); if( p_error ) { @@ -1952,7 +1952,7 @@ static void dissect_ia_serial_number_service( tvbuff_t* tvb, packet_info* pinfo, { if( offset >= size ) { - node = proto_tree_add_expert_format( cemi_list, pinfo, KIP_ERROR, tvb, offset, 0, "? Data: missing" ); + proto_tree_add_expert_format( cemi_list, pinfo, KIP_ERROR, tvb, offset, 0, "? Data: missing" ); error = 1; } } @@ -2713,7 +2713,7 @@ static void dissect_simple_app_service( tvbuff_t* tvb, packet_info* pinfo, proto /* 1 byte Count */ if( offset >= size ) { - node = proto_tree_add_expert_format( cemi_list, pinfo, KIP_ERROR, tvb, offset, 0, "? Count: expected 1 byte" ); + proto_tree_add_expert_format( cemi_list, pinfo, KIP_ERROR, tvb, offset, 0, "? Count: expected 1 byte" ); error = 1; --offset; } @@ -2837,7 +2837,7 @@ static void dissect_cemi_transport_layer( tvbuff_t* tvb, packet_info* pinfo, pro /* 6 bits TPCI */ if( offset >= size ) { - node = proto_tree_add_expert_format( cemi_list, pinfo, KIP_ERROR, tvb, offset, 0, "? TPCI: expected 1 byte" ); + proto_tree_add_expert_format( cemi_list, pinfo, KIP_ERROR, tvb, offset, 0, "? TPCI: expected 1 byte" ); error = 1; } else @@ -2950,7 +2950,7 @@ static void dissect_cemi_link_layer( tvbuff_t* tvb, packet_info* pinfo, proto_tr if( size < 2 ) { ai_list = proto_tree_add_subtree( cemi_list, tvb, offset, 0, ett_cemi_ai, &ai_node, "? Additional Info" ); - node = proto_tree_add_expert_format( ai_list, pinfo, KIP_ERROR, tvb, offset, 0, "? Length: expected 1 byte" ); + proto_tree_add_expert_format( ai_list, pinfo, KIP_ERROR, tvb, offset, 0, "? Length: expected 1 byte" ); offset = size; error = 1; } @@ -3020,7 +3020,7 @@ static void dissect_cemi_link_layer( tvbuff_t* tvb, packet_info* pinfo, proto_tr if( error == 3 ) { proto_item_prepend_text( aie_node, "? " ); - node = proto_tree_add_expert_format( aie_list, pinfo, KIP_ERROR, tvb, offset, 0, "? Length: expected 1 byte" ); + proto_tree_add_expert_format( aie_list, pinfo, KIP_ERROR, tvb, offset, 0, "? Length: expected 1 byte" ); break; } @@ -3117,7 +3117,7 @@ static void dissect_cemi_link_layer( tvbuff_t* tvb, packet_info* pinfo, proto_tr /* 1 byte Control Field 1 */ if( offset >= size ) { - node = proto_tree_add_expert_format( cemi_list, pinfo, KIP_ERROR, tvb, offset, 0, "? Ctrl1: expected 1 byte" ); + proto_tree_add_expert_format( cemi_list, pinfo, KIP_ERROR, tvb, offset, 0, "? Ctrl1: expected 1 byte" ); error = 1; } else @@ -3173,7 +3173,7 @@ static void dissect_cemi_link_layer( tvbuff_t* tvb, packet_info* pinfo, proto_tr /* 1 byte Control Field 2 */ if( offset >= size ) { - node = proto_tree_add_expert_format( cemi_list, pinfo, KIP_ERROR, tvb, offset, 0, "? Ctrl2: expected 1 byte" ); + proto_tree_add_expert_format( cemi_list, pinfo, KIP_ERROR, tvb, offset, 0, "? Ctrl2: expected 1 byte" ); error = 1; } else @@ -3268,7 +3268,7 @@ static void dissect_cemi_link_layer( tvbuff_t* tvb, packet_info* pinfo, proto_tr /* 1 byte NPDU Length */ if( offset >= size ) { - node = proto_tree_add_expert_format( cemi_list, pinfo, KIP_ERROR, tvb, offset, 0, "? Length: expected 1 byte" ); + proto_tree_add_expert_format( cemi_list, pinfo, KIP_ERROR, tvb, offset, 0, "? Length: expected 1 byte" ); error = 1; } else |