[postgis-tickets] r17875 - Use clang pragma only with clang
Sandro Santilli
strk at kbt.io
Mon Oct 7 12:00:45 PDT 2019
Author: strk
Date: 2019-10-07 00:00:45 -0700 (Mon, 07 Oct 2019)
New Revision: 17875
Modified:
trunk/raster/rt_pg/rtpg_mapalgebra.c
Log:
Use clang pragma only with clang
Hopefully fixes #4526
Modified: trunk/raster/rt_pg/rtpg_mapalgebra.c
===================================================================
--- trunk/raster/rt_pg/rtpg_mapalgebra.c 2019-10-07 06:57:58 UTC (rev 17874)
+++ trunk/raster/rt_pg/rtpg_mapalgebra.c 2019-10-07 07:00:45 UTC (rev 17875)
@@ -77,13 +77,10 @@
/* n-raster MapAlgebra */
/* ---------------------------------------------------------------- */
-/* Quiet warning */
-#if GCC_VERSION >= 40604
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunknown-pragmas"
+#if defined(__clang__)
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wgnu-variable-sized-type-not-at-end"
#endif
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wgnu-variable-sized-type-not-at-end"
typedef struct {
Oid ufc_noid;
@@ -101,11 +98,9 @@
#endif
} rtpg_nmapalgebra_callback_arg;
-#pragma clang diagnostic pop
-#if GCC_VERSION >= 40604
-#pragma GCC diagnostic pop
+#if defined(__clang__)
+# pragma clang diagnostic pop
#endif
-/* ! Quiet warning */
typedef struct rtpg_nmapalgebra_arg_t *rtpg_nmapalgebra_arg;
struct rtpg_nmapalgebra_arg_t {
More information about the postgis-tickets
mailing list