From: Ruben Kerkhof Date: Sun, 14 Aug 2016 18:28:43 +0000 (+0200) Subject: annotate vfprintf-like 'vcomplain' function X-Git-Tag: collectd-5.6.0~29 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=ff9e06842df42576585884cd892156db377afd80;p=collectd.git annotate vfprintf-like 'vcomplain' function utils_complain.c:56:40: warning: format string is not a string literal [-Wformat-nonliteral] vsnprintf (message, sizeof (message), format, ap); ^~~~~~ --- diff --git a/src/daemon/utils_complain.c b/src/daemon/utils_complain.c index d028c067..69909bb6 100644 --- a/src/daemon/utils_complain.c +++ b/src/daemon/utils_complain.c @@ -32,6 +32,7 @@ #include "plugin.h" /* vcomplain returns 0 if it did not report, 1 else */ +__attribute__ ((format (printf, 3, 0))) static int vcomplain (int level, c_complain_t *c, const char *format, va_list ap) {