]> granicus.if.org Git - apache/commitdiff
Follow up to r1804123 r1809633.
authorYann Ylavic <ylavic@apache.org>
Tue, 3 Oct 2017 09:26:47 +0000 (09:26 +0000)
committerYann Ylavic <ylavic@apache.org>
Tue, 3 Oct 2017 09:26:47 +0000 (09:26 +0000)
Silence "-Wunknown-pragmas" on GCC...

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1810723 13f79535-47bb-0310-9956-ffa450edef68

modules/md/md_json.c
test/httpdunit.c
test/httpdunit.h

index 6feafa6d269fc27ef01ee5f295e3a1975acd41c4..686056bd5e01ea0ba9a263a48a42e6d84cfac7a9 100644 (file)
 /* 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 <jansson_config.h>
-#undef   JSON_INLINE
+#undef  JSON_INLINE
 #define JSON_INLINE 
 #include <jansson.h>
 
-#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;
index 66ff243a2cfa3abe6dc484f9c10fad513c0e505f..116f045f9c650acd25d64c7adefaba87ea8aa20b 100644 (file)
  */
 
 #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"
 
index 4df39b0d6e7135767f8d745ebe76edb4c2283d5f..d858417bcb02351bec44d24adf67f10916cb2d23 100644 (file)
 
 #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