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_config_scanner.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/sp_config_scanner.h') diff --git a/src/sp_config_scanner.h b/src/sp_config_scanner.h index 560ea6e..dda3dc2 100644 --- a/src/sp_config_scanner.h +++ b/src/sp_config_scanner.h @@ -15,7 +15,7 @@ typedef struct { const char *arg; // optional argument / can be not null terminated size_t arglen; sp_argtype argtype; - long lineno; + size_t lineno; } sp_parsed_keyword; zend_result sp_config_scan(const char *data, zend_result (*process_rule)(sp_parsed_keyword*)); -- cgit v1.3