]> granicus.if.org Git - postgis/commitdiff
Quiet warnings from centos 6 build
authorPaul Ramsey <pramsey@cleverelephant.ca>
Tue, 20 Aug 2019 18:33:00 +0000 (18:33 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Tue, 20 Aug 2019 18:33:00 +0000 (18:33 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@17743 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/lwgeom_geos.c
liblwgeom/lwgeom_geos_cluster.c
postgis/gserialized_gist_nd.c

index a09dc17831ce53b368417c30484b1fc92c99c247..ad6cd8eab6541cff50e46ddcf2d0e6fe125de961 100644 (file)
@@ -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;
index f9a8d1c54350a15ff13a13aac1702642a9be48a9..76c707f6fa0699ebb5a606eb447e810895286c05 100644 (file)
@@ -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)
        {
index 8a5b605b27da1415f1a94ba034b306f8d480b9ae..8475446a74093ad57845040a21bbb90584349514 100644 (file)
@@ -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;