Skip to content

Commit e6aec81

Browse files
committed
Fix SNMP build warnings
1 parent 6e397e9 commit e6aec81

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ext/snmp/snmp.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ static void php_snmp_getvalue(struct variable_list *vars, zval *snmpval, int val
618618
break;
619619

620620
case ASN_OPAQUE_DOUBLE: /* 0x79, asn1.h */
621-
snprintf(buf, buflen, "%Lf", *vars->val.doubleVal);
621+
snprintf(buf, buflen, "%f", *vars->val.doubleVal);
622622
ZVAL_STRING(&val, buf);
623623
break;
624624

@@ -955,7 +955,7 @@ static int php_snmp_parse_oid(zval *object, int st, struct objid_query *objid_qu
955955
if (st & SNMP_CMD_SET) {
956956
if (Z_TYPE_P(type) == IS_STRING && Z_TYPE_P(value) == IS_STRING) {
957957
if (Z_STRLEN_P(type) != 1) {
958-
php_error_docref(NULL, E_WARNING, "Bogus type '%s', should be single char, got %u", Z_STRVAL_P(type), Z_STRLEN_P(type));
958+
php_error_docref(NULL, E_WARNING, "Bogus type '%s', should be single char, got %zu", Z_STRVAL_P(type), Z_STRLEN_P(type));
959959
efree(objid_query->vars);
960960
return FALSE;
961961
}
@@ -994,7 +994,7 @@ static int php_snmp_parse_oid(zval *object, int st, struct objid_query *objid_qu
994994
if (idx_type < Z_ARRVAL_P(type)->nNumUsed) {
995995
convert_to_string_ex(tmp_type);
996996
if (Z_STRLEN_P(tmp_type) != 1) {
997-
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));
997+
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));
998998
efree(objid_query->vars);
999999
return FALSE;
10001000
}
@@ -2025,7 +2025,7 @@ static int php_snmp_has_property(zval *object, zval *member, int has_set_exists,
20252025
}
20262026
/* }}} */
20272027

2028-
static HashTable *php_snmp_get_gc(zval *object, zval ***gc_data, int *gc_data_count) /* {{{ */
2028+
static HashTable *php_snmp_get_gc(zval *object, zval **gc_data, int *gc_data_count) /* {{{ */
20292029
{
20302030
*gc_data = NULL;
20312031
*gc_data_count = 0;

0 commit comments

Comments
 (0)