diff options
author | Bill Meier <wmeier@newsguy.com> | 2011-04-05 15:09:32 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2011-04-05 15:09:32 +0000 |
commit | 40892a0f271de9a96e61f6be821c2a5ff650f6fc (patch) | |
tree | 42e31b65deabca79ff95005e93c4dd8a26fd9eef /epan | |
parent | cbcc0f287ae3a90f6b4e19ae3c1b89c0a178a041 (diff) |
Don't assign to a proto_item * if the value won't be used: Coverity 882;
Also: #include <string.h> not req'd
svn path=/trunk/; revision=36472
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-dis-pdus.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/epan/dissectors/packet-dis-pdus.c b/epan/dissectors/packet-dis-pdus.c index 2cceb2a85e..242faf6caf 100644 --- a/epan/dissectors/packet-dis-pdus.c +++ b/epan/dissectors/packet-dis-pdus.c @@ -28,7 +28,6 @@ # include "config.h" #endif -#include <string.h> #include "packet-dis-pdus.h" #include "packet-dis-fields.h" #include "packet-dis-enums.h" @@ -748,38 +747,38 @@ gint parseFields(tvbuff_t *tvb, proto_tree *tree, gint offset, DIS_ParserNode pa parserNodes[fieldIndex]); break; case DIS_FIELDTYPE_EXERCISE_ID: - pi = proto_tree_add_item(tree, hf_dis_exercise_id, tvb, offset, 1, FALSE); + proto_tree_add_item(tree, hf_dis_exercise_id, tvb, offset, 1, FALSE); offset += 1; break; case DIS_FIELDTYPE_NUM_ARTICULATION_PARAMS: uintVal = tvb_get_guint8(tvb, offset); - pi = proto_tree_add_item(tree, hf_dis_num_art_params, tvb, offset, 1, FALSE); + proto_tree_add_item(tree, hf_dis_num_art_params, tvb, offset, 1, FALSE); offset += 1; *(parserNodes[fieldIndex].outputVar) = (guint32)uintVal; break; case DIS_FIELDTYPE_PDU_LENGTH: uintVal = tvb_get_ntohs(tvb, offset); - pi = proto_tree_add_item(tree, hf_dis_pdu_length, tvb, offset, 2, FALSE); + proto_tree_add_item(tree, hf_dis_pdu_length, tvb, offset, 2, FALSE); offset += 2; break; case DIS_FIELDTYPE_SITE: uintVal = tvb_get_ntohs(tvb, offset); - pi = proto_tree_add_item(tree, hf_dis_entity_id_site, tvb, offset, 2, FALSE); + proto_tree_add_item(tree, hf_dis_entity_id_site, tvb, offset, 2, FALSE); offset += 2; break; case DIS_FIELDTYPE_APPLICATION: uintVal = tvb_get_ntohs(tvb, offset); - pi = proto_tree_add_item(tree, hf_dis_entity_id_application, tvb, offset, 2, FALSE); + proto_tree_add_item(tree, hf_dis_entity_id_application, tvb, offset, 2, FALSE); offset += 2; break; case DIS_FIELDTYPE_ENTITY: uintVal = tvb_get_ntohs(tvb, offset); - pi = proto_tree_add_item(tree, hf_dis_entity_id_entity, tvb, offset, 2, FALSE); + proto_tree_add_item(tree, hf_dis_entity_id_entity, tvb, offset, 2, FALSE); offset += 2; break; case DIS_FIELDTYPE_RADIO_ID: uintVal = tvb_get_ntohs(tvb, offset); - pi = proto_tree_add_item(tree, hf_dis_radio_id, tvb, offset, 2, FALSE); + proto_tree_add_item(tree, hf_dis_radio_id, tvb, offset, 2, FALSE); *(parserNodes[fieldIndex].outputVar) = (guint32)uintVal; offset += 2; break; @@ -1391,7 +1390,7 @@ gint parseFields(tvbuff_t *tvb, proto_tree *tree, gint offset, DIS_ParserNode pa break; case DIS_FIELDTYPE_NUM_ELECTROMAGNETIC_EMISSION_SYSTEMS: uintVal = tvb_get_guint8(tvb, offset); - pi = proto_tree_add_item(tree, hf_dis_num_electromagnetic_emission_systems, tvb, offset, 1, FALSE); + proto_tree_add_item(tree, hf_dis_num_electromagnetic_emission_systems, tvb, offset, 1, FALSE); offset += 1; *(parserNodes[fieldIndex].outputVar) = (guint32)uintVal; break; |