From: Stefan Eissing Date: Mon, 25 Sep 2017 14:20:47 +0000 (+0000) Subject: On the trunk: X-Git-Tag: 2.5.0-alpha~98 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=aaa695b07aa9b9aa3c9b3934a83d5c1357ed1ab6;p=apache 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 --- 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"