From: Yann Ylavic Date: Tue, 3 Oct 2017 09:26:47 +0000 (+0000) Subject: Follow up to r1804123 r1809633. X-Git-Tag: 2.5.0-alpha~70 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21857e40fab155e71de4e53ccd8c05b2796964f0;p=thirdparty%2Fapache%2Fhttpd.git Follow up to r1804123 r1809633. Silence "-Wunknown-pragmas" on GCC... git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1810723 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/md/md_json.c b/modules/md/md_json.c index 6feafa6d269..686056bd5e0 100644 --- a/modules/md/md_json.c +++ b/modules/md/md_json.c @@ -25,19 +25,24 @@ /* jansson thinks everyone compiles with the platform's cc in its fullest capabilities * when undefining their INLINEs, we get static, unused functions, arg */ +#if defined(__GNUC__) #pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wunknown-pragmas" #pragma GCC diagnostic ignored "-Wunreachable-code" +#elif defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunused-function" +#endif #include -#undef JSON_INLINE +#undef JSON_INLINE #define JSON_INLINE #include -#pragma clang diagnostic pop +#if defined(__GNUC__) #pragma GCC diagnostic pop +#elif defined(__clang__) +#pragma clang diagnostic pop +#endif struct md_json_t { apr_pool_t *p; diff --git a/test/httpdunit.c b/test/httpdunit.c index 66ff243a2cf..116f045f9c6 100644 --- a/test/httpdunit.c +++ b/test/httpdunit.c @@ -15,15 +15,22 @@ */ #include "apr.h" /* for pid_t on Windows, needed by Check */ + +#if defined(__GNUC__) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wstrict-prototypes" +#elif defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wstrict-prototypes" +#endif #include "check.h" -#pragma clang diagnostic pop +#if defined(__GNUC__) #pragma GCC diagnostic pop +#elif defined(__clang__) +#pragma clang diagnostic pop +#endif #include "apr_general.h" diff --git a/test/httpdunit.h b/test/httpdunit.h index 4df39b0d6e7..d858417bcb0 100644 --- a/test/httpdunit.h +++ b/test/httpdunit.h @@ -35,15 +35,21 @@ #include "apr.h" /* for pid_t on Windows, needed by Check */ +#if defined(__GNUC__) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wstrict-prototypes" +#elif defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wstrict-prototypes" +#endif #include "check.h" -#pragma clang diagnostic pop +#if defined(__GNUC__) #pragma GCC diagnostic pop +#elif defined(__clang__) +#pragma clang diagnostic pop +#endif /* * Boilerplate Macros