From 426fc238da0c0fb05c6d0a0f04e48c5b966464a2 Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Wed, 22 Mar 2017 14:10:15 +0100 Subject: [PATCH] Fixes for FreeBSD warnings when compiling tests /usr/local/include/check.h:454:75: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments] _ck_assert_failed(__FILE__, __LINE__, "Assertion '"#expr"' failed" , ## __VA_ARGS__, NULL) /usr/local/include/check.h:454:75: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments] --- src/test/check_getdns.c | 3 +++ src/test/check_getdns_common.c | 3 +++ src/test/check_getdns_context_set_timeout.h | 3 +++ src/test/check_getdns_libev.c | 3 +++ src/test/check_getdns_libevent.c | 3 +++ src/test/check_getdns_libuv.c | 3 +++ src/test/check_getdns_transport.h | 3 +++ 7 files changed, 21 insertions(+) diff --git a/src/test/check_getdns.c b/src/test/check_getdns.c index f2dff1fa..8e39fe6e 100644 --- a/src/test/check_getdns.c +++ b/src/test/check_getdns.c @@ -30,7 +30,10 @@ #include #include #include +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments" #include +#pragma clang diagnostic pop #include "getdns/getdns.h" #include "check_getdns_common.h" #include "check_getdns_address.h" diff --git a/src/test/check_getdns_common.c b/src/test/check_getdns_common.c index 20310f93..5a1409ad 100644 --- a/src/test/check_getdns_common.c +++ b/src/test/check_getdns_common.c @@ -29,7 +29,10 @@ #include #include #include +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments" #include +#pragma clang diagnostic pop #include "getdns/getdns.h" #include "config.h" #include "check_getdns_common.h" diff --git a/src/test/check_getdns_context_set_timeout.h b/src/test/check_getdns_context_set_timeout.h index 6aabb198..c4ab14b8 100644 --- a/src/test/check_getdns_context_set_timeout.h +++ b/src/test/check_getdns_context_set_timeout.h @@ -27,7 +27,10 @@ #ifndef _check_getdns_context_set_timeout_h_ #define _check_getdns_context_set_timeout_h_ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments" #include +#pragma clang diagnostic pop Suite * getdns_context_set_timeout_suite (void); diff --git a/src/test/check_getdns_libev.c b/src/test/check_getdns_libev.c index 5523f126..0939f083 100644 --- a/src/test/check_getdns_libev.c +++ b/src/test/check_getdns_libev.c @@ -41,7 +41,10 @@ #else #include #endif +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments" #include +#pragma clang diagnostic pop #include "check_getdns_common.h" void run_event_loop_impl(struct getdns_context* context, void* eventloop) { diff --git a/src/test/check_getdns_libevent.c b/src/test/check_getdns_libevent.c index e9316b6f..d3bd4f69 100644 --- a/src/test/check_getdns_libevent.c +++ b/src/test/check_getdns_libevent.c @@ -37,7 +37,10 @@ #include "getdns/getdns_ext_libevent.h" #include "check_getdns_libevent.h" +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments" #include +#pragma clang diagnostic pop #include "check_getdns_common.h" void run_event_loop_impl(struct getdns_context* context, void* eventloop) { diff --git a/src/test/check_getdns_libuv.c b/src/test/check_getdns_libuv.c index b7d50e72..722406e7 100644 --- a/src/test/check_getdns_libuv.c +++ b/src/test/check_getdns_libuv.c @@ -37,7 +37,10 @@ #include "getdns/getdns_ext_libuv.h" #include +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments" #include +#pragma clang diagnostic pop #include "check_getdns_common.h" void run_event_loop_impl(struct getdns_context* context, void* eventloop) { diff --git a/src/test/check_getdns_transport.h b/src/test/check_getdns_transport.h index 6da58405..6a18d0de 100644 --- a/src/test/check_getdns_transport.h +++ b/src/test/check_getdns_transport.h @@ -27,7 +27,10 @@ #ifndef _check_getdns_transport_h_ #define _check_getdns_transport_h_ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments" #include +#pragma clang diagnostic pop Suite * getdns_transport_suite (void);