httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yla...@apache.org
Subject svn commit: r1827372 - in /httpd/httpd/trunk: modules/md/md_json.c test/httpdunit.h
Date Tue, 20 Mar 2018 22:39:48 GMT
Author: ylavic
Date: Tue Mar 20 22:39:48 2018
New Revision: 1827372

URL: http://svn.apache.org/viewvc?rev=1827372&view=rev
Log:
#pragma GCC diagnostic push/pop exist in gcc >= 4.6 only.

Modified:
    httpd/httpd/trunk/modules/md/md_json.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=1827372&r1=1827371&r2=1827372&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/md/md_json.c (original)
+++ httpd/httpd/trunk/modules/md/md_json.c Tue Mar 20 22:39:48 2018
@@ -28,10 +28,11 @@
  * when undefining their INLINEs, we get static, unused functions, arg 
  */
 #if defined(__GNUC__)
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
 #pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunreachable-code"
 #endif
-#if defined(__clang__)
+#pragma GCC diagnostic ignored "-Wunreachable-code"
+#elif defined(__clang__)
 #pragma clang diagnostic push
 #pragma clang diagnostic ignored "-Wunused-function"
 #endif
@@ -42,9 +43,10 @@
 #include <jansson.h>
 
 #if defined(__GNUC__)
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
 #pragma GCC diagnostic pop
 #endif
-#if defined(__clang__)
+#elif defined(__clang__)
 #pragma clang diagnostic pop
 #endif
 

Modified: httpd/httpd/trunk/test/httpdunit.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/test/httpdunit.h?rev=1827372&r1=1827371&r2=1827372&view=diff
==============================================================================
--- httpd/httpd/trunk/test/httpdunit.h (original)
+++ httpd/httpd/trunk/test/httpdunit.h Tue Mar 20 22:39:48 2018
@@ -36,7 +36,9 @@
 #include "apr.h"   /* for pid_t on Windows, needed by Check */
 
 #if defined(__GNUC__)
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
 #pragma GCC diagnostic push
+#endif
 #pragma GCC diagnostic ignored "-Wstrict-prototypes"
 #elif defined(__clang__)
 #pragma clang diagnostic push
@@ -46,7 +48,9 @@
 #include "check.h"
 
 #if defined(__GNUC__)
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
 #pragma GCC diagnostic pop
+#endif
 #elif defined(__clang__)
 #pragma clang diagnostic pop
 #endif



Mime
View raw message