mirror of
https://gitlab.freedesktop.org/xorg/lib/libxcb-errors.git
synced 2026-01-06 12:00:14 +01:00
tests: Use attribute((format(printf,x,y))) if possible
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
88cebd842e
commit
63ca7f6c88
1 changed files with 11 additions and 1 deletions
12
tests/test.c
12
tests/test.c
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue