Don't assign to a proto_item * if the value won't be used: Coverity 882;
authorwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 5 Apr 2011 15:09:32 +0000 (15:09 +0000)
committerwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 5 Apr 2011 15:09:32 +0000 (15:09 +0000)
Also: #include <string.h> not req'd

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36472 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-dis-pdus.c

index 2cceb2a85e0fba9fe07ce7b4001d0b57bbb452e2..242faf6cafd48fd57d4dec2beb5bd9c231413378 100644 (file)
@@ -28,7 +28,6 @@
 # include "config.h"
 #endif
 
 # include "config.h"
 #endif
 
-#include <string.h>
 #include "packet-dis-pdus.h"
 #include "packet-dis-fields.h"
 #include "packet-dis-enums.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:
                 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);
             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);
             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);
             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);
             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);
             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);
             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;
             *(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);
             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;
             offset += 1;
             *(parserNodes[fieldIndex].outputVar) = (guint32)uintVal;
             break;