[postgis-tickets] r16978 - Remove clang warnings

Paul Ramsey pramsey at cleverelephant.ca
Mon Nov 5 10:27:46 PST 2018


Author: pramsey
Date: 2018-11-05 10:27:46 -0800 (Mon, 05 Nov 2018)
New Revision: 16978

Modified:
   branches/2.4/postgis/lwgeom_geos.c
   branches/2.4/postgis/lwgeom_window.c
   branches/2.4/raster/rt_pg/rtpg_mapalgebra.c
   branches/2.4/raster/rt_pg/rtpostgis.c
Log:
Remove clang warnings


Modified: branches/2.4/postgis/lwgeom_geos.c
===================================================================
--- branches/2.4/postgis/lwgeom_geos.c	2018-11-05 17:57:16 UTC (rev 16977)
+++ branches/2.4/postgis/lwgeom_geos.c	2018-11-05 18:27:46 UTC (rev 16978)
@@ -1542,7 +1542,7 @@
 {
 	GSERIALIZED *geom1;
 	LWGEOM *lwgeom;
-	bool result;
+	char result;
 	GEOSGeom g1;
 
 	geom1 = PG_GETARG_GSERIALIZED_P(0);
@@ -1729,7 +1729,7 @@
 	GSERIALIZED *geom1;
 	GSERIALIZED *geom2;
 	GEOSGeometry *g1, *g2;
-	bool result;
+	char result;
 	GBOX box1, box2;
 
 	geom1 = PG_GETARG_GSERIALIZED_P(0);
@@ -1944,7 +1944,7 @@
 {
 	GSERIALIZED *				geom1;
 	GSERIALIZED *				geom2;
-	bool 					result;
+	char 					result;
 	GBOX 			box1, box2;
 	PrepGeomCache *	prep_cache;
 
@@ -2514,7 +2514,7 @@
 	GSERIALIZED *geom1;
 	GSERIALIZED *geom2;
 	GEOSGeometry *g1, *g2;
-	bool result;
+	char result;
 	GBOX box1, box2;
 
 	geom1 = PG_GETARG_GSERIALIZED_P(0);
@@ -2581,7 +2581,7 @@
 	GSERIALIZED *geom1;
 	GSERIALIZED *geom2;
 	GEOSGeometry *g1, *g2;
-	bool result;
+	char result;
 	GBOX box1, box2;
 
 	geom1 = PG_GETARG_GSERIALIZED_P(0);
@@ -2648,7 +2648,7 @@
 	GSERIALIZED *geom1;
 	GSERIALIZED *geom2;
 	char *patt;
-	bool result;
+	char result;
 	GEOSGeometry *g1, *g2;
 	int i;
 
@@ -2784,7 +2784,7 @@
 	GSERIALIZED *geom1;
 	GSERIALIZED *geom2;
 	GEOSGeometry *g1, *g2;
-	bool result;
+	char result;
 	GBOX box1, box2;
 
 	geom1 = PG_GETARG_GSERIALIZED_P(0);

Modified: branches/2.4/postgis/lwgeom_window.c
===================================================================
--- branches/2.4/postgis/lwgeom_window.c	2018-11-05 17:57:16 UTC (rev 16977)
+++ branches/2.4/postgis/lwgeom_window.c	2018-11-05 18:27:46 UTC (rev 16978)
@@ -50,7 +50,7 @@
 typedef struct
 {
 	uint32_t cluster_id;
-	char is_null;        /* NULL may result from a NULL geometry input, or it may be used by
+	bool is_null;        /* NULL may result from a NULL geometry input, or it may be used by
 							algorithms such as DBSCAN that do not assign all inputs to a
 							cluster. */
 } dbscan_cluster_result;

Modified: branches/2.4/raster/rt_pg/rtpg_mapalgebra.c
===================================================================
--- branches/2.4/raster/rt_pg/rtpg_mapalgebra.c	2018-11-05 17:57:16 UTC (rev 16977)
+++ branches/2.4/raster/rt_pg/rtpg_mapalgebra.c	2018-11-05 18:27:46 UTC (rev 16978)
@@ -1137,7 +1137,7 @@
 	/* run prepared plan */
 	if (plan != NULL) {
 		Datum values[12];
-		bool nulls[12];
+		char nulls[12];
 		int err = 0;
 
 		TupleDesc tupdesc;
@@ -1144,7 +1144,7 @@
 		SPITupleTable *tuptable = NULL;
 		HeapTuple tuple;
 		Datum datum;
-		bool isnull = FALSE;
+		bool isnull = false;
 
 		POSTGIS_RT_DEBUGF(4, "Running plan %d", id);
 
@@ -6122,7 +6122,7 @@
 	uint8_t argpos[3][8] = {{0}};
 	char *argkw[] = {"[rast1.x]", "[rast1.y]", "[rast1.val]", "[rast1]", "[rast2.x]", "[rast2.y]", "[rast2.val]", "[rast2]"};
 	Datum values[ARGKWCOUNT];
-	bool nulls[ARGKWCOUNT];
+	char nulls[ARGKWCOUNT];
 	TupleDesc tupdesc;
 	SPITupleTable *tuptable = NULL;
 	HeapTuple tuple;

Modified: branches/2.4/raster/rt_pg/rtpostgis.c
===================================================================
--- branches/2.4/raster/rt_pg/rtpostgis.c	2018-11-05 17:57:16 UTC (rev 16977)
+++ branches/2.4/raster/rt_pg/rtpostgis.c	2018-11-05 18:27:46 UTC (rev 16978)
@@ -246,7 +246,7 @@
 
 static char *gdal_datapath = NULL;
 extern char *gdal_enabled_drivers;
-extern char enable_outdb_rasters;
+extern bool enable_outdb_rasters;
 
 /* ---------------------------------------------------------------- */
 /*  Useful variables                                                */



More information about the postgis-tickets mailing list