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
This commit is contained in:
parent
cbcc0f287a
commit
40892a0f27
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue