summaryrefslogtreecommitdiff
path: root/src/sp_config.c
diff options
context:
space:
mode:
authorChristian Göttsche2024-06-06 16:36:40 +0200
committerjvoisin2024-06-06 16:36:40 +0200
commit849252c6a48b428dde3ad8930b40a2bdf9874cb7 (patch)
tree0fdc4d1e65c0f4fb4f670b95390c41be808b1ad1 /src/sp_config.c
parent381aa67af284e421ce6554e7bf6039dda5e674b9 (diff)
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.
Diffstat (limited to 'src/sp_config.c')
-rw-r--r--src/sp_config.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sp_config.c b/src/sp_config.c
index 2d2631a..de58c2a 100644
--- a/src/sp_config.c
+++ b/src/sp_config.c
@@ -90,7 +90,7 @@ zend_result sp_process_rule(sp_parsed_keyword *parsed_rule, const sp_config_keyw
90 90
91 if (!found_kw) { 91 if (!found_kw) {
92 zend_string *kwname = zend_string_init(kw->kw, kw->kwlen, 0); 92 zend_string *kwname = zend_string_init(kw->kw, kw->kwlen, 0);
93 sp_log_err("config", "Unexpected keyword '%s' on line %d", ZSTR_VAL(kwname), kw->lineno); 93 sp_log_err("config", "Unexpected keyword '%s' on line %zu", ZSTR_VAL(kwname), kw->lineno);
94 zend_string_release_ex(kwname, 0); 94 zend_string_release_ex(kwname, 0);
95 return FAILURE; 95 return FAILURE;
96 } 96 }