From: Mark Cave-Ayland Date: Sun, 28 Sep 2008 15:47:02 +0000 (+0000) Subject: Clear up warnings (mixed declartions within code and invalid return) from r3022. X-Git-Tag: 1.4.0b1~688 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ec619b69ffd678090d72eb324ceceb1e5af3b2b3;p=postgis Clear up warnings (mixed declartions within code and invalid return) from r3022. git-svn-id: http://svn.osgeo.org/postgis/trunk@3024 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/lwgeom/lwgeom_rtree.c b/lwgeom/lwgeom_rtree.c index 269508111..a9f863f73 100644 --- a/lwgeom/lwgeom_rtree.c +++ b/lwgeom/lwgeom_rtree.c @@ -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; } /* diff --git a/lwgeom/lwgeom_rtree.h b/lwgeom/lwgeom_rtree.h index ea55c7fc9..cc694cfb2 100644 --- a/lwgeom/lwgeom_rtree.h +++ b/lwgeom/lwgeom_rtree.h @@ -56,7 +56,7 @@ typedef struct * it is applicable to the current polygon. */ RTREE_POLY_CACHE *retrieveCache(LWGEOM *lwgeom, uchar *serializedPoly, RTREE_POLY_CACHE *currentCache); -RTREE_POLY_CACHE *createCache(); +RTREE_POLY_CACHE *createCache(void); /* Frees the cache. */ void populateCache(RTREE_POLY_CACHE *cache, LWGEOM *lwgeom, uchar *serializedPoly); void clearCache(RTREE_POLY_CACHE *cache);