diff mbox series

[v2,2/6] virtiofsd: Add printf checking to fuse_log

Message ID 20200827153657.111098-3-dgilbert@redhat.com
State New
Headers show
Series None | expand

Commit Message

Dr. David Alan Gilbert Aug. 27, 2020, 3:36 p.m. UTC
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>

Use qemu's GCC_FMT_ATTR to add printf style checking to fuse_log.

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
 tools/virtiofsd/fuse_log.h | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

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_ */