From 402f405698a8bbe36c066c9b34fb023165f9ad59 Mon Sep 17 00:00:00 2001 From: Paul Ramsey Date: Tue, 31 Jan 2012 20:46:18 +0000 Subject: [PATCH] Remove some compile warnings. git-svn-id: http://svn.osgeo.org/postgis/trunk@8984 b70326c6-7e19-0410-871a-916f4a2858ee --- liblwgeom/lwgeodetic.c | 13 +++++++++---- loader/pgsql2shp-cli.c | 2 +- loader/pgsql2shp-core.h | 2 +- loader/shp2pgsql-cli.c | 2 +- loader/shp2pgsql-core.h | 2 +- loader/shp2pgsql-gui.c | 2 +- 6 files changed, 14 insertions(+), 9 deletions(-) diff --git a/liblwgeom/lwgeodetic.c b/liblwgeom/lwgeodetic.c index 0db9d4893..93e455778 100644 --- a/liblwgeom/lwgeodetic.c +++ b/liblwgeom/lwgeodetic.c @@ -2660,14 +2660,18 @@ double lwgeom_length_spheroid(const LWGEOM *geom, const SPHEROID *s) * those points, back over to the bounds. * http://trac.osgeo.org/postgis/ticket/1292 */ -int ptarray_nudge_geodetic(POINTARRAY *pa) +static int +ptarray_nudge_geodetic(POINTARRAY *pa) { int i; POINT4D p; int altered = LW_FALSE; int rv = LW_FALSE; static double tolerance = 1e-10; - if ( ! pa ) return; + + if ( ! pa ) + lwerror("ptarray_nudge_geodetic called with null input"); + for(i = 0; i < pa->npoints; i++ ) { getPoint4d_p(pa, i, &p); @@ -2707,7 +2711,8 @@ int ptarray_nudge_geodetic(POINTARRAY *pa) * those points, back over to the bounds. * http://trac.osgeo.org/postgis/ticket/1292 */ -int lwgeom_nudge_geodetic(LWGEOM *geom) +int +lwgeom_nudge_geodetic(LWGEOM *geom) { int type; int i = 0; @@ -2746,7 +2751,7 @@ int lwgeom_nudge_geodetic(LWGEOM *geom) for ( i = 0; i < col->ngeoms; i++ ) { - rv = (rv == LW_TRUE ? rv : ptarray_nudge_geodetic(col->geoms[i])); + rv = (rv == LW_TRUE ? rv : lwgeom_nudge_geodetic(col->geoms[i])); } return rv; } diff --git a/loader/pgsql2shp-cli.c b/loader/pgsql2shp-cli.c index f14e10c76..2eb439a7a 100644 --- a/loader/pgsql2shp-cli.c +++ b/loader/pgsql2shp-cli.c @@ -24,7 +24,7 @@ static void usage() { - printf(_("RELEASE: %s (%s)\n"), POSTGIS_VERSION, RCSID ); + printf(_("RELEASE: %s (%s)\n"), POSTGIS_VERSION, P2S_RCSID ); printf(_("USAGE: pgsql2shp [] [.]\n" " pgsql2shp [] \n" "\n" diff --git a/loader/pgsql2shp-core.h b/loader/pgsql2shp-core.h index bd4f7cef1..a5453384d 100644 --- a/loader/pgsql2shp-core.h +++ b/loader/pgsql2shp-core.h @@ -29,7 +29,7 @@ #include "shpcommon.h" #include "getopt.h" -#define RCSID "$Id$" +#define P2S_RCSID "$Id$" /* diff --git a/loader/shp2pgsql-cli.c b/loader/shp2pgsql-cli.c index f65b13dbb..987288e3d 100644 --- a/loader/shp2pgsql-cli.c +++ b/loader/shp2pgsql-cli.c @@ -21,7 +21,7 @@ static void usage() { - printf(_( "RELEASE: %s (r%s)\n" ), POSTGIS_VERSION, RCSID); + printf(_( "RELEASE: %s (r%s)\n" ), POSTGIS_VERSION, S2P_RCSID); printf(_( "USAGE: shp2pgsql [] [[.]
]\n" "OPTIONS:\n" )); printf(_( " -s [:] Set the SRID field. Defaults to %d.\n" diff --git a/loader/shp2pgsql-core.h b/loader/shp2pgsql-core.h index 8e7dce50a..e0d18fbab 100644 --- a/loader/shp2pgsql-core.h +++ b/loader/shp2pgsql-core.h @@ -29,7 +29,7 @@ #include "../liblwgeom/stringbuffer.h" -#define RCSID "$Id$" +#define S2P_RCSID "$Id$" /* Number of digits of precision in WKT produced. */ diff --git a/loader/shp2pgsql-gui.c b/loader/shp2pgsql-gui.c index 080c8e586..07e94a1eb 100644 --- a/loader/shp2pgsql-gui.c +++ b/loader/shp2pgsql-gui.c @@ -2267,7 +2267,7 @@ pgui_create_main_window(const SHPCONNECTIONCONFIG *conn) static void usage() { - printf("RCSID: %s RELEASE: %s\n", RCSID, POSTGIS_VERSION); + printf("RCSID: %s RELEASE: %s\n", S2P_RCSID, POSTGIS_VERSION); printf("USAGE: shp2pgsql-gui [options]\n"); printf("OPTIONS:\n"); printf(" -U \n"); -- 2.40.0