[Mapserver-dev] Windows warnings in mapgd.c and others

Howard Butler hobu at iastate.edu
Tue Sep 28 11:29:13 EDT 2004


Folks,

My nightly windows build process was showing 80+ warnings in mapgd.c when 
building with MSVC.  I took some time yesterday to clean up these 
warnings.  As you can see in this build output 
<http://hobu.stat.iastate.edu/mapserver/build_output/9_26_2004/mapserver_full.txt>, 
most of the warnings were related to doubles and floats being automatically 
cast into integers (MSVC appears to expect you to be explicit to suppress 
the warning).

If someone gets some time, please look at this diff 
<http://hobu.stat.iastate.edu/mapserver/build_output/9_28_2004/mapgd.c.diff> 
to see if the choices for the casts that I made are appropriate.  After 
compiling this, all of Sean's tests still pass, and I didn't notice any 
changes in GD's rendering, but I would like someone else to help me review 
this before checking it in as it might cause some very subtle errors if the 
wrong cast was chosen.

As for warnings in other files, I think it would be a good goal (but 
probably a low priority, unfortunately) to have a warning-free build in 
Windows by the time 4.4 is released.  If you have a chance to take a look 
at the build output and can quickly patch things up to suppress the 
warning, it would be much appreciated.  Here is the current status of 
number of warnings.  Nightly builds are located at 
<http://hobu.stat.iastate.edu/mapserver/build_output> to see the effect of 
your changes on the build.

This email message exists in bugzilla as #914 
<http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=912>

Howard

MSVC warnings in a full build (PDF, SWF, SDE, PostGIS, Oracle and others) 
-- 9/28/2004
-------------------------------------------------------------------------------------------------
File			Warnings	Notes
-------------------------------------------------------------------------------------------------
cgiutil.c		3		< and > mismatches/undefined functions
mapdraw.c		2		undefined functions/unused variable
mapdrawgdal.c	3		Integer casts
mapfile.c		4		Integer casts
mapimagemap.c	11		const issues/Integer casts
maplabel.c		4		< and > mismatches/argument mismatch
maplayer.c		1		undefined functions
maplegend.c		2		Integer cast/argument mismatch
maporaclespatial.c	2		signed/unsigned mismatch
mappdf.c		6		Integer casts/unused variable/pointer indirection
mappostgis.c		4		argument mismatch/function without a return value
mapprojhack.c		1		Inconsistent DLL linkage
maprasterquery.c	1		Integer casts
mapresample.c	4		Integer casts
mapsde.c		9		argument mismatch
mapserv.c		8		Integer casts
mapshape.c		2		Integer casts
mapstring.c		1		< and > mismatches
mapswf.c		62		Integer casts/incompatible types/functions with too many 
parameters
mapsymbol.c		4		Integer casts
maptime.c		2		undefined functions/pointer indirection
mapwms.c		1		undefined functions
mapxbase.c		4		< and > mismatches
sortshp.c		5		undefined functions/function call issues




More information about the mapserver-dev mailing list