]> granicus.if.org Git - postgis/commitdiff
Clear up warnings (mixed declartions within code and invalid return) from r3022.
authorMark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Sun, 28 Sep 2008 15:47:02 +0000 (15:47 +0000)
committerMark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Sun, 28 Sep 2008 15:47:02 +0000 (15:47 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@3024 b70326c6-7e19-0410-871a-916f4a2858ee

lwgeom/lwgeom_rtree.c
lwgeom/lwgeom_rtree.h

index 26950811173eb03cc5d16abc4efcda84b32ae1fe..a9f863f731ac625bf3687e782fdeb7f7599bfcfb 100644 (file)
@@ -404,14 +404,17 @@ RTREE_POLY_CACHE * createCache()
 void populateCache(RTREE_POLY_CACHE *currentCache, LWGEOM *lwgeom, uchar *serializedPoly)
 {
        int i, j, k, length;
+       LWMPOLY *mpoly;
+       LWPOLY *poly;
+       int nrings;
        
        LWDEBUGF(2, "populateCache called with cache %p geom %p", currentCache, lwgeom);
 
        if(TYPE_GETTYPE(lwgeom->type) == MULTIPOLYGONTYPE) 
        {
                LWDEBUG(2, "populateCache MULTIPOLYGON");
-               LWMPOLY *mpoly = (LWMPOLY *)lwgeom;
-               int nrings = 0;
+               mpoly = (LWMPOLY *)lwgeom;
+               nrings = 0;
                /*
                ** Count the total number of rings.
                */
@@ -444,7 +447,7 @@ void populateCache(RTREE_POLY_CACHE *currentCache, LWGEOM *lwgeom, uchar *serial
        else if ( TYPE_GETTYPE(lwgeom->type) == POLYGONTYPE ) 
        {
                LWDEBUG(2, "populateCache POLYGON");
-               LWPOLY *poly = (LWPOLY *)lwgeom;
+               poly = (LWPOLY *)lwgeom;
                currentCache->polyCount = 1;
                currentCache->ringCount = poly->nrings;
                /*
@@ -459,7 +462,7 @@ void populateCache(RTREE_POLY_CACHE *currentCache, LWGEOM *lwgeom, uchar *serial
        else 
        {
                /* Uh oh, shouldn't be here. */
-               return NULL;
+               return;
        }
 
        /*
index ea55c7fc953065edc48173d76c42abac4eecbd1b..cc694cfb269336c26d4a1af2dbc023320bcae4a6 100644 (file)
@@ -56,7 +56,7 @@ typedef struct
  * it is applicable to the current polygon.\r
  */\r
 RTREE_POLY_CACHE *retrieveCache(LWGEOM *lwgeom, uchar *serializedPoly, RTREE_POLY_CACHE *currentCache);\r
-RTREE_POLY_CACHE *createCache();\r
+RTREE_POLY_CACHE *createCache(void);\r
 /* Frees the cache. */\r
 void populateCache(RTREE_POLY_CACHE *cache, LWGEOM *lwgeom, uchar *serializedPoly);\r
 void clearCache(RTREE_POLY_CACHE *cache);\r