From 849252c6a48b428dde3ad8930b40a2bdf9874cb7 Mon Sep 17 00:00:00 2001 From: Christian Göttsche Date: Thu, 6 Jun 2024 16:36:40 +0200 Subject: Add format attribute to log function and adjust format specifiers Annotate the common logging function sp_log_msgf() with the format attribute so compilers can check the used format string and passed arguments for discrepancies. Adjust the lineno printing by using %zu and the type size_t consistently. --- src/sp_ini.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/sp_ini.c') diff --git a/src/sp_ini.c b/src/sp_ini.c index 8860a92..cfbc615 100644 --- a/src/sp_ini.c +++ b/src/sp_ini.c @@ -97,7 +97,7 @@ static bool /* success */ sp_ini_check(zend_string *const restrict varname, zend if (entry->msg) { sp_log_ini_check_violation("%s", ZSTR_VAL(entry->msg)); } else { - sp_log_ini_check_violation("INI value %lld for `%s` out of range", lvalue, ZSTR_VAL(entry->key)); + sp_log_ini_check_violation("INI value " ZEND_LONG_FMT " for `%s` out of range", lvalue, ZSTR_VAL(entry->key)); } return simulation; } -- cgit v1.3