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]
This commit is contained in:
Willem Toorop 2017-03-22 14:10:15 +01:00
parent b2ac3849b7
commit 426fc238da
7 changed files with 21 additions and 0 deletions

View File

@ -30,7 +30,10 @@
#include <string.h> #include <string.h>
#include <inttypes.h> #include <inttypes.h>
#include <unistd.h> #include <unistd.h>
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
#include <check.h> #include <check.h>
#pragma clang diagnostic pop
#include "getdns/getdns.h" #include "getdns/getdns.h"
#include "check_getdns_common.h" #include "check_getdns_common.h"
#include "check_getdns_address.h" #include "check_getdns_address.h"

View File

@ -29,7 +29,10 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <inttypes.h> #include <inttypes.h>
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
#include <check.h> #include <check.h>
#pragma clang diagnostic pop
#include "getdns/getdns.h" #include "getdns/getdns.h"
#include "config.h" #include "config.h"
#include "check_getdns_common.h" #include "check_getdns_common.h"

View File

@ -27,7 +27,10 @@
#ifndef _check_getdns_context_set_timeout_h_ #ifndef _check_getdns_context_set_timeout_h_
#define _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 <check.h> #include <check.h>
#pragma clang diagnostic pop
Suite * Suite *
getdns_context_set_timeout_suite (void); getdns_context_set_timeout_suite (void);

View File

@ -41,7 +41,10 @@
#else #else
#include <ev.h> #include <ev.h>
#endif #endif
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
#include <check.h> #include <check.h>
#pragma clang diagnostic pop
#include "check_getdns_common.h" #include "check_getdns_common.h"
void run_event_loop_impl(struct getdns_context* context, void* eventloop) { void run_event_loop_impl(struct getdns_context* context, void* eventloop) {

View File

@ -37,7 +37,10 @@
#include "getdns/getdns_ext_libevent.h" #include "getdns/getdns_ext_libevent.h"
#include "check_getdns_libevent.h" #include "check_getdns_libevent.h"
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
#include <check.h> #include <check.h>
#pragma clang diagnostic pop
#include "check_getdns_common.h" #include "check_getdns_common.h"
void run_event_loop_impl(struct getdns_context* context, void* eventloop) { void run_event_loop_impl(struct getdns_context* context, void* eventloop) {

View File

@ -37,7 +37,10 @@
#include "getdns/getdns_ext_libuv.h" #include "getdns/getdns_ext_libuv.h"
#include <uv.h> #include <uv.h>
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
#include <check.h> #include <check.h>
#pragma clang diagnostic pop
#include "check_getdns_common.h" #include "check_getdns_common.h"
void run_event_loop_impl(struct getdns_context* context, void* eventloop) { void run_event_loop_impl(struct getdns_context* context, void* eventloop) {

View File

@ -27,7 +27,10 @@
#ifndef _check_getdns_transport_h_ #ifndef _check_getdns_transport_h_
#define _check_getdns_transport_h_ #define _check_getdns_transport_h_
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
#include <check.h> #include <check.h>
#pragma clang diagnostic pop
Suite * Suite *
getdns_transport_suite (void); getdns_transport_suite (void);