[postgis-tickets] r17876 - Address compiler warnings
Raul
raul at rmr.ninja
Mon Oct 7 03:29:32 PDT 2019
Author: algunenano
Date: 2019-10-07 03:29:32 -0700 (Mon, 07 Oct 2019)
New Revision: 17876
Modified:
trunk/postgis/lwgeom_functions_basic.c
trunk/postgis/lwgeom_geos.c
trunk/postgis/lwgeom_sfcgal.c
Log:
Address compiler warnings
Closes #4527
Closes https://github.com/postgis/postgis/pull/490
Modified: trunk/postgis/lwgeom_functions_basic.c
===================================================================
--- trunk/postgis/lwgeom_functions_basic.c 2019-10-07 07:00:45 UTC (rev 17875)
+++ trunk/postgis/lwgeom_functions_basic.c 2019-10-07 10:29:32 UTC (rev 17876)
@@ -1546,12 +1546,12 @@
holes = lwalloc(sizeof(LWLINE *) * nholes);
for (i = 0; i < nholes; i++)
{
-#if GCC_VERSION >= 40604
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsign-compare"
#endif
GSERIALIZED *g = (GSERIALIZED *)(ARR_DATA_PTR(array) + offset);
-#if GCC_VERSION >= 40604
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
#pragma GCC diagnostic pop
#endif
LWLINE *hole;
Modified: trunk/postgis/lwgeom_geos.c
===================================================================
--- trunk/postgis/lwgeom_geos.c 2019-10-07 07:00:45 UTC (rev 17875)
+++ trunk/postgis/lwgeom_geos.c 2019-10-07 10:29:32 UTC (rev 17876)
@@ -390,12 +390,12 @@
/* One geom, good geom? Return it */
if ( count == 1 && nelems == 1 )
{
-#if GCC_VERSION >= 40604
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsign-compare"
#endif
PG_RETURN_POINTER((GSERIALIZED *)(ARR_DATA_PTR(array)));
-#if GCC_VERSION >= 40604
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
#pragma GCC diagnostic pop
#endif
}
Modified: trunk/postgis/lwgeom_sfcgal.c
===================================================================
--- trunk/postgis/lwgeom_sfcgal.c 2019-10-07 07:00:45 UTC (rev 17875)
+++ trunk/postgis/lwgeom_sfcgal.c 2019-10-07 10:29:32 UTC (rev 17876)
@@ -63,7 +63,8 @@
if (!__sfcgal_init)
{
sfcgal_init();
- sfcgal_set_error_handlers((sfcgal_error_handler_t)lwpgnotice, (sfcgal_error_handler_t)lwpgerror);
+ sfcgal_set_error_handlers((sfcgal_error_handler_t)(void *)lwpgnotice,
+ (sfcgal_error_handler_t)(void *)lwpgerror);
sfcgal_set_alloc_handlers(lwalloc, lwfree);
__sfcgal_init = 1;
}
More information about the postgis-tickets
mailing list