knxip: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang

Change-Id: Ifa64a819d50b730eae4a5c2447b502580a871f16
Reviewed-on: https://code.wireshark.org/review/31318
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Alexis La Goutte 2019-01-03 08:59:42 +00:00 committed by Anders Broman
parent 6fa164e7c4
commit b842b8e7c4
1 changed files with 11 additions and 11 deletions

View File

@ -1706,7 +1706,7 @@ static guint8 dissect_dib_devinfo( tvbuff_t* tvb, packet_info* pinfo,
if( struct_len >= 6 )
{
/* 2 bytes KNX Address */
item = knxip_tree_add_knx_address( dib_tree, hf_knxip_knx_address, tvb, offset, output, output_max );
knxip_tree_add_knx_address( dib_tree, hf_knxip_knx_address, tvb, offset, output, output_max );
if( output )
{
@ -2672,7 +2672,7 @@ static guint8 dissect_secure_wrapper( guint8 header_length, tvbuff_t* tvb, packe
else
{
guint16 session = tvb_get_ntohs( tvb, offset );
node = proto_tree_add_item( tree, hf_knxip_session, tvb, offset, 2, ENC_BIG_ENDIAN );
proto_tree_add_item( tree, hf_knxip_session, tvb, offset, 2, ENC_BIG_ENDIAN );
if( session )
{
@ -2692,7 +2692,7 @@ static guint8 dissect_secure_wrapper( guint8 header_length, tvbuff_t* tvb, packe
}
else
{
node = knxip_tree_add_data( tree, tvb, offset, 6, cinfo, item, "Sequence Number", " $", ", Seq Nr: $" );
knxip_tree_add_data( tree, tvb, offset, 6, cinfo, item, "Sequence Number", " $", ", Seq Nr: $" );
offset += 6;
size -= 6;
@ -2705,7 +2705,7 @@ static guint8 dissect_secure_wrapper( guint8 header_length, tvbuff_t* tvb, packe
}
else
{
node = knxip_tree_add_data( tree, tvb, offset, 6, cinfo, item, "Serial Number", ".", ", Ser Nr: $" );
knxip_tree_add_data( tree, tvb, offset, 6, cinfo, item, "Serial Number", ".", ", Ser Nr: $" );
offset += 6;
size -= 6;
@ -2719,7 +2719,7 @@ static guint8 dissect_secure_wrapper( guint8 header_length, tvbuff_t* tvb, packe
else
{
guint16 tag = tvb_get_ntohs( tvb, offset );
node = proto_tree_add_item( tree, hf_knxip_tag, tvb, offset, 2, ENC_BIG_ENDIAN );
proto_tree_add_item( tree, hf_knxip_tag, tvb, offset, 2, ENC_BIG_ENDIAN );
col_append_fstr( cinfo, COL_INFO, ".%04X", tag );
proto_item_append_text( item, ", Tag: $%04X", tag );
offset += 2;
@ -2802,10 +2802,10 @@ static guint8 dissect_secure_wrapper( guint8 header_length, tvbuff_t* tvb, packe
}
/* Embedded KIP packet */
node = knxip_tree_add_data( tree, tvb2, 0, size2, NULL, NULL, "Embedded KNXnet/IP packet", NULL, NULL );
knxip_tree_add_data( tree, tvb2, 0, size2, NULL, NULL, "Embedded KNXnet/IP packet", NULL, NULL );
/* MAC */
node = knxip_tree_add_data( tree, tvb2, size2, 16, NULL, NULL, "Message Authentication Code", NULL, NULL );
knxip_tree_add_data( tree, tvb2, size2, 16, NULL, NULL, "Message Authentication Code", NULL, NULL );
/* Dissect embedded KIP packet */
{
@ -2857,7 +2857,7 @@ static guint8 dissect_timer_notify( guint8 header_length, tvbuff_t* tvb, packet_
}
else
{
node = knxip_tree_add_data( tree, tvb, offset, 6, cinfo, item, "Timestamp", " $", ", Timestamp: $" );
knxip_tree_add_data( tree, tvb, offset, 6, cinfo, item, "Timestamp", " $", ", Timestamp: $" );
offset += 6;
size -= 6;
@ -2870,7 +2870,7 @@ static guint8 dissect_timer_notify( guint8 header_length, tvbuff_t* tvb, packet_
}
else
{
node = knxip_tree_add_data( tree, tvb, offset, 6, cinfo, item, "Serial Number", ".", ", Ser Nr: $" );
knxip_tree_add_data( tree, tvb, offset, 6, cinfo, item, "Serial Number", ".", ", Ser Nr: $" );
offset += 6;
size -= 6;
@ -2884,7 +2884,7 @@ static guint8 dissect_timer_notify( guint8 header_length, tvbuff_t* tvb, packet_
else
{
guint16 tag = tvb_get_ntohs( tvb, offset );
node = proto_tree_add_item( tree, hf_knxip_tag, tvb, offset, 2, ENC_BIG_ENDIAN );
proto_tree_add_item( tree, hf_knxip_tag, tvb, offset, 2, ENC_BIG_ENDIAN );
col_append_fstr( cinfo, COL_INFO, ".%04X", tag );
proto_item_append_text( item, ", Tag: $%04X", tag );
offset += 2;
@ -2908,7 +2908,7 @@ static guint8 dissect_timer_notify( guint8 header_length, tvbuff_t* tvb, packet_
struct knx_keyring_mca_keys* mca_key;
guint8 key_index;
node = knxip_tree_add_data( tree, tvb, offset, 16, NULL, NULL, "Message Authentication Code", NULL, NULL );
knxip_tree_add_data( tree, tvb, offset, 16, NULL, NULL, "Message Authentication Code", NULL, NULL );
*mac_info = '\0';