diff --git a/asn1/snmp/packet-snmp-template.c b/asn1/snmp/packet-snmp-template.c index 452485e26a..7930fd5fde 100644 --- a/asn1/snmp/packet-snmp-template.c +++ b/asn1/snmp/packet-snmp-template.c @@ -448,17 +448,18 @@ new_format_oid(subid_t *oid, guint oid_length, int len; unsigned int i; char *buf; +#ifdef HAVE_SOME_SNMP + guchar *oid_string; + size_t oid_string_len; + size_t oid_out_len; +#endif - if (oid == NULL || oid_length < 1) { + if (oid == NULL || oid_length < 1) { *decoded = NULL; return; } #ifdef HAVE_SOME_SNMP - guchar *oid_string; - size_t oid_string_len; - size_t oid_out_len; - /* * Get the decoded form of the OID, and add its length to the * length of the result string. diff --git a/epan/dissectors/packet-snmp.c b/epan/dissectors/packet-snmp.c index edb2c6b1dc..7c8067a050 100644 --- a/epan/dissectors/packet-snmp.c +++ b/epan/dissectors/packet-snmp.c @@ -573,17 +573,18 @@ new_format_oid(subid_t *oid, guint oid_length, int len; unsigned int i; char *buf; +#ifdef HAVE_SOME_SNMP + guchar *oid_string; + size_t oid_string_len; + size_t oid_out_len; +#endif - if (oid == NULL || oid_length < 1) { + if (oid == NULL || oid_length < 1) { *decoded = NULL; return; } #ifdef HAVE_SOME_SNMP - guchar *oid_string; - size_t oid_string_len; - size_t oid_out_len; - /* * Get the decoded form of the OID, and add its length to the * length of the result string. @@ -2704,7 +2705,7 @@ static void dissect_SMUX_PDUs_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree /*--- End of included file: packet-snmp-fn.c ---*/ -#line 1043 "packet-snmp-template.c" +#line 1044 "packet-snmp-template.c" guint dissect_snmp_pdu(tvbuff_t *tvb, int offset, packet_info *pinfo, @@ -3396,7 +3397,7 @@ void proto_register_snmp(void) { "RReqPDU/operation", HFILL }}, /*--- End of included file: packet-snmp-hfarr.c ---*/ -#line 1398 "packet-snmp-template.c" +#line 1399 "packet-snmp-template.c" }; /* List of subtrees */ @@ -3434,7 +3435,7 @@ void proto_register_snmp(void) { &ett_snmp_RReqPDU, /*--- End of included file: packet-snmp-ettarr.c ---*/ -#line 1407 "packet-snmp-template.c" +#line 1408 "packet-snmp-template.c" }; module_t *snmp_module;