aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2014-08-11 09:16:18 +0200
committerEvan Huus <eapache@gmail.com>2014-08-11 14:43:32 +0000
commit4c131ced560998ae32916295959568e2a39e04aa (patch)
tree8d0fa59da9e0182359f8150d7aada99179dbb767
parentdb7143d9066f505d136669b0aff5cfb0030e7ac2 (diff)
SNMP: Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: I00d66ff57fd3ea1ede692c85b2ae0286c30557b7 Reviewed-on: https://code.wireshark.org/review/3550 Reviewed-by: Evan Huus <eapache@gmail.com>
-rw-r--r--asn1/snmp/packet-snmp-template.c4
-rw-r--r--epan/dissectors/packet-snmp.c10
2 files changed, 5 insertions, 9 deletions
diff --git a/asn1/snmp/packet-snmp-template.c b/asn1/snmp/packet-snmp-template.c
index b6ab3b8d6a..566ad665c1 100644
--- a/asn1/snmp/packet-snmp-template.c
+++ b/asn1/snmp/packet-snmp-template.c
@@ -1013,10 +1013,8 @@ indexing_done:
expert_add_info(actx->pinfo, pi_value, &ei_snmp_missing_mib);
}
-already_added:
- oid_info_is_ok = FALSE;
}
-
+already_added:
pt_value = proto_item_add_subtree(pi_value,ett_value);
if (value_len > 0 && oid_string) {
diff --git a/epan/dissectors/packet-snmp.c b/epan/dissectors/packet-snmp.c
index cd8c2584f6..79c11d7d73 100644
--- a/epan/dissectors/packet-snmp.c
+++ b/epan/dissectors/packet-snmp.c
@@ -1115,10 +1115,8 @@ indexing_done:
expert_add_info(actx->pinfo, pi_value, &ei_snmp_missing_mib);
}
-already_added:
- oid_info_is_ok = FALSE;
}
-
+already_added:
pt_value = proto_item_add_subtree(pi_value,ett_value);
if (value_len > 0 && oid_string) {
@@ -3084,7 +3082,7 @@ static void dissect_SMUX_PDUs_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, pro
/*--- End of included file: packet-snmp-fn.c ---*/
-#line 1876 "../../asn1/snmp/packet-snmp-template.c"
+#line 1874 "../../asn1/snmp/packet-snmp-template.c"
guint
@@ -3912,7 +3910,7 @@ void proto_register_snmp(void) {
NULL, HFILL }},
/*--- End of included file: packet-snmp-hfarr.c ---*/
-#line 2439 "../../asn1/snmp/packet-snmp-template.c"
+#line 2437 "../../asn1/snmp/packet-snmp-template.c"
};
/* List of subtrees */
@@ -3952,7 +3950,7 @@ void proto_register_snmp(void) {
&ett_snmp_RReqPDU_U,
/*--- End of included file: packet-snmp-ettarr.c ---*/
-#line 2455 "../../asn1/snmp/packet-snmp-template.c"
+#line 2453 "../../asn1/snmp/packet-snmp-template.c"
};
static ei_register_info ei[] = {
{ &ei_snmp_failed_decrypted_data_pdu, { "snmp.failed_decrypted_data_pdu", PI_MALFORMED, PI_WARN, "Failed to decrypt encryptedPDU", EXPFILL }},