From c799927e154972cc380a6e602f2a4732a28af902 Mon Sep 17 00:00:00 2001 From: Snaipe Date: Thu, 17 Sep 2015 00:20:45 +0200 Subject: [PATCH] Made the invalid asprintf test conditional --- test/asprintf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/asprintf.c b/test/asprintf.c index 2640337..26630fd 100644 --- a/test/asprintf.c +++ b/test/asprintf.c @@ -55,11 +55,11 @@ Theory((struct format_test *fmt), asprintf, valid) { free(actual); } -#ifdef __GNUC__ +#if defined(__unix__) && defined(__GNUC__) # pragma GCC diagnostic ignored "-Wformat" -#endif Test(asprintf, invalid) { char *actual; cr_expect_eq(cr_asprintf(&actual, "%"), -1); } +#endif