From: Regina Obe Date: Thu, 19 May 2011 04:04:14 +0000 (+0000) Subject: clean up some compiler warnings X-Git-Tag: 2.0.0alpha1~1614 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d559b561765e0cc4248426985895964a1f06926f;p=postgis clean up some compiler warnings git-svn-id: http://svn.osgeo.org/postgis/trunk@7198 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/liblwgeom/lwout_x3d.c b/liblwgeom/lwout_x3d.c index f5598e134..49c153274 100644 --- a/liblwgeom/lwout_x3d.c +++ b/liblwgeom/lwout_x3d.c @@ -164,7 +164,7 @@ asx3d3_line_buf(const LWLINE *line, char *srs, char *output, int precision, int ptr += sprintf(ptr, ""); @@ -234,7 +234,7 @@ asx3d3_mpoly_coordindex(const LWMPOLY *psur, char *output) { char *ptr=output; LWPOLY *patch; - int i, j, k, l, si; + int i, j, k, l; int np; j = 0; for (i=0; ingeoms; i++) @@ -403,35 +403,35 @@ asx3d3_multi_size(const LWCOLLECTION *col, char *srs, int precision, int opts, c static size_t asx3d3_multi_buf(const LWCOLLECTION *col, char *srs, char *output, int precision, int opts, const char *defid) { - int type = col->type; char *ptr, *x3dtype; int i; LWGEOM *subgeom; - POINTARRAY *pa; - ptr = output; x3dtype=""; - if (type == MULTIPOINTTYPE) - { - x3dtype = "PointSet"; - ptr += sprintf(ptr, "<%s %s>", x3dtype, defid); - } - else if (type == MULTILINETYPE) + switch (col->type) { - x3dtype = "IndexedLineSet"; - ptr += sprintf(ptr, "<%s %s coordIndex='", x3dtype, defid); - ptr += asx3d3_mline_coordindex(col, ptr); - ptr += sprintf(ptr, "'>"); - } - else if (type == MULTIPOLYGONTYPE) - { - x3dtype = "IndexedFaceSet"; - ptr += sprintf(ptr, "<%s %s coordIndex='", x3dtype, defid); - ptr += asx3d3_mpoly_coordindex(col,ptr); - ptr += sprintf(ptr, "'>"); - } + case MULTIPOINTTYPE: + x3dtype = "PointSet"; + ptr += sprintf(ptr, "<%s %s>", x3dtype, defid); + break; + case MULTILINETYPE: + x3dtype = "IndexedLineSet"; + ptr += sprintf(ptr, "<%s %s coordIndex='", x3dtype, defid); + ptr += asx3d3_mline_coordindex(col, ptr); + ptr += sprintf(ptr, "'>"); + break; + case MULTIPOLYGONTYPE: + x3dtype = "IndexedFaceSet"; + ptr += sprintf(ptr, "<%s %s coordIndex='", x3dtype, defid); + ptr += asx3d3_mpoly_coordindex(col,ptr); + ptr += sprintf(ptr, "'>"); + break; + default: + lwerror("asx3d3_multi_buf: '%s' geometry type not supported", lwtype_name(col->type)); + return NULL; + } ptr += sprintf(ptr, "