httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yla...@apache.org
Subject svn commit: r1810723 - in /httpd/httpd/trunk: modules/md/md_json.c test/httpdunit.c test/httpdunit.h
Date Tue, 03 Oct 2017 09:26:47 GMT
Author: ylavic
Date: Tue Oct  3 09:26:47 2017
New Revision: 1810723

URL: http://svn.apache.org/viewvc?rev=1810723&view=rev
Log:
Follow up to r1804123 r1809633.

Silence "-Wunknown-pragmas" on GCC...

Modified:
    httpd/httpd/trunk/modules/md/md_json.c
    httpd/httpd/trunk/test/httpdunit.c
    httpd/httpd/trunk/test/httpdunit.h

Modified: httpd/httpd/trunk/modules/md/md_json.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/md/md_json.c?rev=1810723&r1=1810722&r2=1810723&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/md/md_json.c (original)
+++ httpd/httpd/trunk/modules/md/md_json.c Tue Oct  3 09:26:47 2017
@@ -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 <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;

Modified: httpd/httpd/trunk/test/httpdunit.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/test/httpdunit.c?rev=1810723&r1=1810722&r2=1810723&view=diff
==============================================================================
--- httpd/httpd/trunk/test/httpdunit.c (original)
+++ httpd/httpd/trunk/test/httpdunit.c Tue Oct  3 09:26:47 2017
@@ -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"
 

Modified: httpd/httpd/trunk/test/httpdunit.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/test/httpdunit.h?rev=1810723&r1=1810722&r2=1810723&view=diff
==============================================================================
--- httpd/httpd/trunk/test/httpdunit.h (original)
+++ httpd/httpd/trunk/test/httpdunit.h Tue Oct  3 09:26:47 2017
@@ -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



Mime
View raw message