From aaa695b07aa9b9aa3c9b3934a83d5c1357ed1ab6 Mon Sep 17 00:00:00 2001 From: Stefan Eissing Date: Mon, 25 Sep 2017 14:20:47 +0000 Subject: [PATCH] On the trunk: Fix for maintainer-mode compiler errors when including check.h in unit tests. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1809633 13f79535-47bb-0310-9956-ffa450edef68 --- test/httpdunit.c | 8 ++++++++ test/httpdunit.h | 9 +++++++++ test/unit/authn.c | 1 - test/unit/util.c | 1 - 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/test/httpdunit.c b/test/httpdunit.c index 1e7582353a..66ff243a2c 100644 --- a/test/httpdunit.c +++ b/test/httpdunit.c @@ -15,8 +15,16 @@ */ #include "apr.h" /* for pid_t on Windows, needed by Check */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-prototypes" +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wstrict-prototypes" + #include "check.h" +#pragma clang diagnostic pop +#pragma GCC diagnostic pop + #include "apr_general.h" static Suite *main_test_suite(void) diff --git a/test/httpdunit.h b/test/httpdunit.h index 2fdee36e65..4df39b0d6e 100644 --- a/test/httpdunit.h +++ b/test/httpdunit.h @@ -34,8 +34,17 @@ */ #include "apr.h" /* for pid_t on Windows, needed by Check */ + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-prototypes" +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wstrict-prototypes" + #include "check.h" +#pragma clang diagnostic pop +#pragma GCC diagnostic pop + /* * Boilerplate Macros */ diff --git a/test/unit/authn.c b/test/unit/authn.c index 67ef04a3c5..236248215c 100644 --- a/test/unit/authn.c +++ b/test/unit/authn.c @@ -14,7 +14,6 @@ * limitations under the License. */ -#include "check.h" #include "../httpdunit.h" #include "httpd.h" diff --git a/test/unit/util.c b/test/unit/util.c index 17c10931a5..5cadfd89ba 100644 --- a/test/unit/util.c +++ b/test/unit/util.c @@ -14,7 +14,6 @@ * limitations under the License. */ -#include "check.h" #include "../httpdunit.h" #include "httpd.h" -- 2.40.0