From 44eccb2c9d6f8dde8059cf75305d04992ae9feb7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Bollo?= Date: Fri, 27 May 2016 14:58:15 +0200 Subject: [PATCH] improves detection of formatting error MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Change-Id: I426013cb841d6826c4904f68bf5fa1c653dd972c Signed-off-by: José Bollo --- include/afb/afb-plugin.h | 1 + src/verbose.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/afb/afb-plugin.h b/include/afb/afb-plugin.h index 6f5cd08c..81df3a8f 100644 --- a/include/afb/afb-plugin.h +++ b/include/afb/afb-plugin.h @@ -213,6 +213,7 @@ static inline struct sd_bus *afb_daemon_get_system_bus(struct afb_daemon daemon) * 'file' and 'line' are indicators of position of the code in source files. * 'daemon' MUST be the daemon given in interface when activating the plugin. */ +static inline void afb_daemon_verbose(struct afb_daemon daemon, int level, const char *file, int line, const char *fmt, ...) __attribute__((format(printf, 5, 6))); static inline void afb_daemon_verbose(struct afb_daemon daemon, int level, const char *file, int line, const char *fmt, ...) { va_list args; diff --git a/src/verbose.h b/src/verbose.h index 3382d39f..7e10d252 100644 --- a/src/verbose.h +++ b/src/verbose.h @@ -23,7 +23,7 @@ extern int verbosity; extern void verbose_set_name(const char *name, int authority); -extern void verbose(int level, const char *file, int line, const char *fmt, ...); +extern void verbose(int level, const char *file, int line, const char *fmt, ...) __attribute__((format(printf, 4, 5))); extern void vverbose(int level, const char *file, int line, const char *fmt, va_list args); # define ERROR(...) do{if(verbosity>=0)verbose(3,__FILE__,__LINE__,__VA_ARGS__);}while(0) -- 2.16.6