From c17865f527c4206dcd6387c8e1ae8822acd16a10 Mon Sep 17 00:00:00 2001 From: Paul Ramsey Date: Tue, 20 Aug 2019 18:33:00 +0000 Subject: [PATCH] Quiet warnings from centos 6 build git-svn-id: http://svn.osgeo.org/postgis/trunk@17743 b70326c6-7e19-0410-871a-916f4a2858ee --- liblwgeom/lwgeom_geos.c | 4 ++-- liblwgeom/lwgeom_geos_cluster.c | 4 ++++ postgis/gserialized_gist_nd.c | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/liblwgeom/lwgeom_geos.c b/liblwgeom/lwgeom_geos.c index a09dc1783..ad6cd8eab 100644 --- a/liblwgeom/lwgeom_geos.c +++ b/liblwgeom/lwgeom_geos.c @@ -243,8 +243,8 @@ ptarray_to_GEOSCoordSeq(const POINTARRAY* pa, uint8_t fix_ring) 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; diff --git a/liblwgeom/lwgeom_geos_cluster.c b/liblwgeom/lwgeom_geos_cluster.c index f9a8d1c54..76c707f6f 100644 --- a/liblwgeom/lwgeom_geos_cluster.c +++ b/liblwgeom/lwgeom_geos_cluster.c @@ -81,6 +81,10 @@ static struct STRTree 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) { diff --git a/postgis/gserialized_gist_nd.c b/postgis/gserialized_gist_nd.c index 8a5b605b2..8475446a7 100644 --- a/postgis/gserialized_gist_nd.c +++ b/postgis/gserialized_gist_nd.c @@ -665,7 +665,7 @@ Datum gserialized_distance_nd(PG_FUNCTION_ARGS) /* 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; /* Un-sqrt the distance so we can add extra terms */ distance = distance * distance; -- 2.49.0