]> granicus.if.org Git - postgis/commitdiff
getting rid of some compiling warnings
authorNicklas Avén <nicklas.aven@jordogskog.no>
Tue, 6 Aug 2013 17:09:15 +0000 (17:09 +0000)
committerNicklas Avén <nicklas.aven@jordogskog.no>
Tue, 6 Aug 2013 17:09:15 +0000 (17:09 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@11739 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/lwout_twkb.c
postgis/lwgeom_accum.c

index f10df7600595e73657681d6afd350374e843f418..a0ff7d8ce4589166ff11e616d6cd000c12fcdcb6 100644 (file)
@@ -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[])
 {
index 11043f9266d7491242b5fab55dbb30ac86dde45b..104fe09dbaaee62353ad33545473ec9adf62c36d 100644 (file)
@@ -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;