libcollectdclient: annotate vprintf-like function
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Sun, 14 Aug 2016 18:18:47 +0000 (20:18 +0200)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Sun, 14 Aug 2016 18:20:35 +0000 (20:20 +0200)
client.c:126:21: warning: format string is not a string literal [-Wformat-nonliteral]
  status = vprintf (format, ap);
                    ^~~~~~

src/libcollectdclient/client.c

index a15e0aa..4dbee1e 100644 (file)
@@ -113,6 +113,7 @@ typedef struct lcc_response_s lcc_response_t;
 /*
  * Private functions
  */
+__attribute__ ((format (printf, 1, 0)))
 static int lcc_tracef(char const *format, ...)
 {
   va_list ap;