From 985ec9d6ec56f15a72ec974ff2fd1f7bab68cd91 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Fri, 10 Feb 2012 14:30:56 +0000 Subject: Add printf format annotations to all '...' functions To allow the compile to detect incorrect printf formats, any var-args function should have a format annotation * common/macros.h: Helper to define ATTR_PRINTF for code which can't depend on glib * common/canvas_base.c, common/lz.h, common/macros.h: Annotate some var-args methods --- common/log.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'common/log.h') diff --git a/common/log.h b/common/log.h index 949879e..37c491f 100644 --- a/common/log.h +++ b/common/log.h @@ -20,6 +20,7 @@ #include #include +#include "macros.h" SPICE_BEGIN_DECLS @@ -45,14 +46,14 @@ void spice_logv(const char *log_domain, const char *strloc, const char *function, const char *format, - va_list args); + va_list args) SPICE_ATTR_PRINTF(5, 0); void spice_log(const char *log_domain, SpiceLogLevel log_level, const char *strloc, const char *function, const char *format, - ...); + ...) SPICE_ATTR_PRINTF(5, 6); #ifndef spice_return_if_fail #define spice_return_if_fail(x) SPICE_STMT_START { \ -- cgit