[postgis-tickets] r17742 - Quiet warnings from centos6 build

Paul Ramsey pramsey at cleverelephant.ca
Tue Aug 20 11:32:31 PDT 2019


Author: pramsey
Date: 2019-08-20 11:32:30 -0700 (Tue, 20 Aug 2019)
New Revision: 17742

Modified:
   branches/2.5/liblwgeom/lwgeom_geos.c
   branches/2.5/liblwgeom/lwgeom_geos_cluster.c
   branches/2.5/postgis/gserialized_gist_nd.c
Log:
Quiet warnings from centos6 build


Modified: branches/2.5/liblwgeom/lwgeom_geos.c
===================================================================
--- branches/2.5/liblwgeom/lwgeom_geos.c	2019-08-20 18:18:43 UTC (rev 17741)
+++ branches/2.5/liblwgeom/lwgeom_geos.c	2019-08-20 18:32:30 UTC (rev 17742)
@@ -243,8 +243,8 @@
 	uint32_t dims = 2;
 	uint32_t i;
 	int append_points = 0;
-	const POINT3DZ* p3d;
-	const POINT2D* p2d;
+	const POINT3DZ* p3d = NULL;
+	const POINT2D* p2d = NULL;
 	GEOSCoordSeq sq;
 
 	if (FLAGS_GET_Z(pa->flags)) dims = 3;

Modified: branches/2.5/liblwgeom/lwgeom_geos_cluster.c
===================================================================
--- branches/2.5/liblwgeom/lwgeom_geos_cluster.c	2019-08-20 18:18:43 UTC (rev 17741)
+++ branches/2.5/liblwgeom/lwgeom_geos_cluster.c	2019-08-20 18:32:30 UTC (rev 17742)
@@ -81,6 +81,10 @@
 make_strtree(void** geoms, uint32_t num_geoms, char is_lwgeom)
 {
 	struct STRTree tree;
+	tree.envelopes = 0;
+	tree.num_geoms = 0;
+	tree.geom_ids = 0;
+
 	tree.tree = GEOSSTRtree_create(STRTREE_NODE_CAPACITY);
 	if (tree.tree == NULL)
 	{

Modified: branches/2.5/postgis/gserialized_gist_nd.c
===================================================================
--- branches/2.5/postgis/gserialized_gist_nd.c	2019-08-20 18:18:43 UTC (rev 17741)
+++ branches/2.5/postgis/gserialized_gist_nd.c	2019-08-20 18:32:30 UTC (rev 17742)
@@ -856,7 +856,7 @@
 	/* Can only add the M term if both objects have M */
 	if ( lwgeom_has_m(lw1) && lwgeom_has_m(lw2) )
 	{
-		double m1, m2;
+		double m1 = 0, m2 = 0;
 		int usebox = false;
 
 		if ( lwgeom_get_type(lw1) == POINTTYPE )



More information about the postgis-tickets mailing list