aboutsummaryrefslogtreecommitdiffstats
path: root/include/fuse_log.h
diff options
context:
space:
mode:
authorBernd Schubert <bernd@bsbernd.com>2025-09-18 23:39:11 +0200
committerBernd Schubert <bernd@bsbernd.com>2025-09-19 14:02:14 +0200
commit3e2cd9e46c87a57de374b82fd198328f7745e942 (patch)
treeb9c810312020980871f28d2ff35d56243b693d74 /include/fuse_log.h
parent52a633a5d4435f1965fc8d44cf9a705e6679f793 (diff)
downloadlibfuse-3e2cd9e46c87a57de374b82fd198328f7745e942.tar.gz
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 <bernd@bsbernd.com>
Diffstat (limited to 'include/fuse_log.h')
-rw-r--r--include/fuse_log.h3
1 files changed, 2 insertions, 1 deletions
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