[postgis-commits] svn - r3024 - trunk/lwgeom
postgis-commits at postgis.refractions.net
postgis-commits at postgis.refractions.net
Sun Sep 28 08:47:02 PDT 2008
Author: mcayland
Date: 2008-09-28 08:47:02 -0700 (Sun, 28 Sep 2008)
New Revision: 3024
Modified:
trunk/lwgeom/lwgeom_rtree.c
trunk/lwgeom/lwgeom_rtree.h
Log:
Clear up warnings (mixed declartions within code and invalid return) from r3022.
Modified: trunk/lwgeom/lwgeom_rtree.c
===================================================================
--- trunk/lwgeom/lwgeom_rtree.c 2008-09-28 15:32:46 UTC (rev 3023)
+++ trunk/lwgeom/lwgeom_rtree.c 2008-09-28 15:47:02 UTC (rev 3024)
@@ -404,14 +404,17 @@
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 @@
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 @@
else
{
/* Uh oh, shouldn't be here. */
- return NULL;
+ return;
}
/*
Modified: trunk/lwgeom/lwgeom_rtree.h
===================================================================
--- trunk/lwgeom/lwgeom_rtree.h 2008-09-28 15:32:46 UTC (rev 3023)
+++ trunk/lwgeom/lwgeom_rtree.h 2008-09-28 15:47:02 UTC (rev 3024)
@@ -56,7 +56,7 @@
* 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);
More information about the postgis-commits
mailing list