]> granicus.if.org Git - php/commitdiff
Suppress uninitialized variable warning in snmp
authorNikita Popov <nikita.ppv@gmail.com>
Wed, 9 Sep 2020 08:23:06 +0000 (10:23 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Wed, 9 Sep 2020 09:23:34 +0000 (11:23 +0200)
These are false positive warnings.

ext/snmp/snmp.c

index 44c9c98e71a3c11d939aecace7a1751cd02fe91b..3305565f79ea87986ba832d4e0fa30002c41367b 100644 (file)
@@ -1082,7 +1082,7 @@ static void php_snmp(INTERNAL_FUNCTION_PARAMETERS, int st, int version)
 {
        zend_string *oid_str, *type_str = NULL, *value_str = NULL;
        HashTable *oid_ht, *type_ht = NULL, *value_ht = NULL;
-       char *a1, *a2, *a3, *a4, *a5, *a6, *a7;
+       char *a1 = NULL, *a2 = NULL, *a3 = NULL, *a4 = NULL, *a5 = NULL, *a6 = NULL, *a7 = NULL;
        size_t a1_len, a2_len, a3_len, a4_len, a5_len, a6_len, a7_len;
        zend_bool use_orignames = 0, suffix_keys = 0;
        zend_long timeout = SNMP_DEFAULT_TIMEOUT;