]> granicus.if.org Git - php/commitdiff
Fix SNMP build warnings
authorNikita Popov <nikita.ppv@gmail.com>
Fri, 14 Jun 2019 10:44:54 +0000 (12:44 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Fri, 14 Jun 2019 10:45:46 +0000 (12:45 +0200)
ext/snmp/snmp.c

index 1c781304c52e0b5bcebed8aad629efcd7d44e824..5cbbda064b461996fdd80c9f85f6a68055d0c828 100644 (file)
@@ -618,7 +618,7 @@ static void php_snmp_getvalue(struct variable_list *vars, zval *snmpval, int val
                        break;
 
                case ASN_OPAQUE_DOUBLE:         /* 0x79, asn1.h */
-                       snprintf(buf, buflen, "%Lf", *vars->val.doubleVal);
+                       snprintf(buf, buflen, "%f", *vars->val.doubleVal);
                        ZVAL_STRING(&val, buf);
                        break;
 
@@ -955,7 +955,7 @@ static int php_snmp_parse_oid(zval *object, int st, struct objid_query *objid_qu
                if (st & SNMP_CMD_SET) {
                        if (Z_TYPE_P(type) == IS_STRING && Z_TYPE_P(value) == IS_STRING) {
                                if (Z_STRLEN_P(type) != 1) {
-                                       php_error_docref(NULL, E_WARNING, "Bogus type '%s', should be single char, got %u", Z_STRVAL_P(type), Z_STRLEN_P(type));
+                                       php_error_docref(NULL, E_WARNING, "Bogus type '%s', should be single char, got %zu", Z_STRVAL_P(type), Z_STRLEN_P(type));
                                        efree(objid_query->vars);
                                        return FALSE;
                                }
@@ -994,7 +994,7 @@ static int php_snmp_parse_oid(zval *object, int st, struct objid_query *objid_qu
                                        if (idx_type < Z_ARRVAL_P(type)->nNumUsed) {
                                                convert_to_string_ex(tmp_type);
                                                if (Z_STRLEN_P(tmp_type) != 1) {
-                                                       php_error_docref(NULL, E_WARNING, "'%s': bogus type '%s', should be single char, got %u", Z_STRVAL_P(tmp_oid), Z_STRVAL_P(tmp_type), Z_STRLEN_P(tmp_type));
+                                                       php_error_docref(NULL, E_WARNING, "'%s': bogus type '%s', should be single char, got %zu", Z_STRVAL_P(tmp_oid), Z_STRVAL_P(tmp_type), Z_STRLEN_P(tmp_type));
                                                        efree(objid_query->vars);
                                                        return FALSE;
                                                }
@@ -2025,7 +2025,7 @@ static int php_snmp_has_property(zval *object, zval *member, int has_set_exists,
 }
 /* }}} */
 
-static HashTable *php_snmp_get_gc(zval *object, zval ***gc_data, int *gc_data_count) /* {{{ */
+static HashTable *php_snmp_get_gc(zval *object, zval **gc_data, int *gc_data_count) /* {{{ */
 {
        *gc_data = NULL;
        *gc_data_count = 0;