tests: Use attribute((format(printf,x,y))) if possible

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2015-04-05 13:46:23 +02:00
parent 88cebd842e
commit 63ca7f6c88

View file

@ -29,9 +29,19 @@
#include <stdlib.h>
#include <string.h>
#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 203)
#define ATTRIBUTE_PRINTF(x,y) __attribute__((__format__(__printf__,x,y)))
#else
#define ATTRIBUTE_PRINTF(x,y)
#endif
#define SKIP 77
static int check_strings(const char *expected, const char *actual, const char *format, ...)
static int check_strings(const char *expected, const char *actual,
const char *format, ...) ATTRIBUTE_PRINTF(3, 4);
static int check_strings(const char *expected, const char *actual,
const char *format, ...)
{
va_list ap;