From 3e2cd9e46c87a57de374b82fd198328f7745e942 Mon Sep 17 00:00:00 2001 From: Bernd Schubert Date: Thu, 18 Sep 2025 23:39:11 +0200 Subject: fuse_log: Add __attribute__((format(printf, ) and fix warnings fuse_log() did not have that attribute and so compilers didn't give warnings for plain printf(). Add the attribute and fix related warnings. Signed-off-by: Bernd Schubert --- include/fuse_log.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/fuse_log.h b/include/fuse_log.h index b901db2..7948bab 100644 --- a/include/fuse_log.h +++ b/include/fuse_log.h @@ -73,7 +73,8 @@ void fuse_set_log_func(fuse_log_func_t func); * @param level severity level (FUSE_LOG_ERR, FUSE_LOG_DEBUG, etc) * @param fmt sprintf-style format string including newline */ -void fuse_log(enum fuse_log_level level, const char *fmt, ...); +void fuse_log(enum fuse_log_level level, const char *fmt, ...) + __attribute__((format(printf, 2, 3))); /** * Switch default log handler from stderr to syslog -- cgit v1.2.3