From 672dec8ee6af2bda9f3d9e10e1329a92557dd1c4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicklas=20Av=C3=A9n?= Date: Tue, 6 Aug 2013 17:09:15 +0000 Subject: [PATCH] getting rid of some compiling warnings git-svn-id: http://svn.osgeo.org/postgis/trunk@11739 b70326c6-7e19-0410-871a-916f4a2858ee --- liblwgeom/lwout_twkb.c | 8 ++++++-- postgis/lwgeom_accum.c | 5 ++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/liblwgeom/lwout_twkb.c b/liblwgeom/lwout_twkb.c index f10df7600..a0ff7d8ce 100644 --- a/liblwgeom/lwout_twkb.c +++ b/liblwgeom/lwout_twkb.c @@ -217,7 +217,9 @@ static size_t ptarray_to_twkb_size(const POINTARRAY *pa, uint8_t variant,int pre /* Unknown method! */ default: lwerror("Unsupported compression method: %d",method ); - } + } + /*Just to make the compiler quiet*/ + return 0; } @@ -358,7 +360,9 @@ static uint8_t* ptarray_to_twkb_buf(const POINTARRAY *pa, uint8_t *buf, uint8_t /* Unknown method! */ default: lwerror("Unsupported compression method: %d",method ); - } + } + /*Just to make the compiler quiet*/ + return 0; } static uint8_t* ptarray_to_twkb_buf_m0(const POINTARRAY *pa, uint8_t *buf, uint8_t variant,int8_t prec,int accum_rel[]) { diff --git a/postgis/lwgeom_accum.c b/postgis/lwgeom_accum.c index 11043f926..104fe09db 100644 --- a/postgis/lwgeom_accum.c +++ b/postgis/lwgeom_accum.c @@ -173,7 +173,6 @@ pgis_twkb_accum_transfn(PG_FUNCTION_ARGS) int32 newlen; text *endianess; GSERIALIZED *geom; - int i; uint8_t variant = 0; if (!AggCheckCallContext(fcinfo, &aggcontext)) @@ -221,7 +220,7 @@ oldcontext = MemoryContextSwitchTo(aggcontext); } else { - state = PG_GETARG_POINTER(0); + state = (twkb_state*) PG_GETARG_POINTER(0); if(!((state->n_rows)<(state->max_rows))) { @@ -361,7 +360,7 @@ pgis_twkb_accum_finalfn(PG_FUNCTION_ARGS) size_t twkb_size; uint8_t *twkb; bytea *result; - state = PG_GETARG_POINTER(0); + state = (twkb_state*) PG_GETARG_POINTER(0); lwgeom_arrays.n_points=lwgeom_arrays.n_linestrings=lwgeom_arrays.n_polygons=lwgeom_arrays.n_collections=0; geom_array=state->geoms; -- 2.40.0