build warnings in source code

Frank Warmerdam warmerdam at POBOX.COM
Thu Nov 4 16:55:59 EST 2004


Kralidis,Tom [Burlington] wrote:
> maplegend.c: In function `msDrawLegend':
> maplegend.c:233: warning: unused variable `empty_legend'

Fixed.

> mapwms.c: In function `msDumpLayer':
> mapwms.c:1086: warning: `pszMetadataName' might be used uninitialized in
> this function

I filed a bug on this witht he WMS maintainers.  The logic in this
area looks hosed to me, and I think pszMetadataName would be used
uninitialized.

> mapprojhack.c:111: warning: missing braces around initializer
> mapprojhack.c:111: warning: (near initialization for `pj_units_copy[0]')

My fault, but I won't fix it.  To yucky to add all the extra braces.  Eventually
I can get rid of this when everyone is using PROJ 4.4.9 or newer.

> mapdraw.c: In function `msDrawMap':
> mapdraw.c:386: warning: implicit declaration of function
> `msDrawWMSLayerPDF'

Fixed.
> mappdf.c: In function `msSaveImagePDF':
> mappdf.c:1208: warning: unused variable `out'
> mappdf.c: In function `msDrawTextPDF':
> mappdf.c:1337: warning: assignment makes integer from pointer without a
> cast

Fixed.

I don't build with pdf currently, so if someone else who does could verify
the pdf changes still build clean that would be helpful.  I can break
stuff with the smallest simpliest changes sometimes.

> maptime.c: In function `msStrptime':
> maptime.c:157: warning: implicit declaration of function `strptime'
> maptime.c:157: warning: return makes pointer from integer without a cast

I'm not touching this.

> mapwcs.c: In function `msWCSDispatch':
> mapwcs.c:1087: warning: unused variable `status'

fixed.

> shp2pdf.c: In function `main':
> shp2pdf.c:76: warning: unused variable `img'
> shp2pdf.c:83: warning: unused variable `pdf'
> shp2pdf.c:88: warning: unused variable `MapScaleFactor'
> shp2pdf.c:89: warning: unused variable `MapPixelSize'

fixed.

> mapserv.c: In function `main':
> mapserv.c:1051: warning: unused variable `sname'

fixed.

Ironically I had just done a "logged" build before your email came through
so I could clean up some of the warnings.

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the mapserver-dev mailing list