From: "Dr. David Alan Gilbert" <dgilb...@redhat.com> Use qemu's GCC_FMT_ATTR to add printf style checking to fuse_log.
Signed-off-by: Dr. David Alan Gilbert <dgilb...@redhat.com> --- tools/virtiofsd/fuse_log.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/virtiofsd/fuse_log.h b/tools/virtiofsd/fuse_log.h index bf6c11ff11..3ea38312b0 100644 --- a/tools/virtiofsd/fuse_log.h +++ b/tools/virtiofsd/fuse_log.h @@ -15,6 +15,7 @@ */ #include <stdarg.h> +#include "qemu/compiler.h" /** * Log severity level @@ -69,6 +70,7 @@ 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 */ +GCC_FMT_ATTR(2, 3) void fuse_log(enum fuse_log_level level, const char *fmt, ...); #endif /* FUSE_LOG_H_ */ -- 2.26.2