Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add /w14701 compiler check for potentially uninitialized local variables #5976

Closed
wants to merge 1 commit into from

Conversation

geographika
Copy link
Member

@geographika geographika commented Jan 15, 2020

As per discussions in #5974 add in the compiler flag to check for uninitialized variables. See C6001docs for details. Also StackOverflow.

List of warnings as follows:

  \mapserver\mapservutil.c(1901): warning C4701: potentially uninitialized local variable 'execstarttime' used 
  \mapserver\mapservutil.c(1890): warning C4701: potentially uninitialized local variable 'requeststarttime' used 
  \mapserver\mapwmslayer.c(1002): warning C4701: potentially uninitialized local variable 'bbox_height' used 
  \mapserver\mapwmslayer.c(1002): warning C4701: potentially uninitialized local variable 'bbox_width' used 
  \mapserver\mapwmslayer.c(1216): warning C4701: potentially uninitialized local variable 'bbox' used 
  \mapserver\mapwms.c(822): warning C4701: potentially uninitialized local variable 'numranges' used 
  \mapserver\mapwms.c(824): warning C4701: potentially uninitialized local variable 'numonerange' used 
  \mapserver\mapchart.c(540): warning C4701: potentially uninitialized local variable 'barMaxVal' used 
  \mapserver\mapchart.c(540): warning C4701: potentially uninitialized local variable 'barMinVal' used 
  \mapserver\mapchart.c(421): warning C4701: potentially uninitialized local variable 'diameter' used 
  \mapserver\mapchart.c(403): warning C4701: potentially uninitialized local variable 'maxvalue' used 
  \mapserver\mapchart.c(401): warning C4701: potentially uninitialized local variable 'minvalue' used 
  \mapserver\mapchart.c(404): warning C4701: potentially uninitialized local variable 'maxdiameter' used 
  \mapserver\mapimageio.c(422): warning C4701: potentially uninitialized local variable 'a' used 
  \mapserver\mapdraw.c(2350): warning C4701: potentially uninitialized local variable 'ts' used 
  \mapserver\mapdraw.c(2373): warning C4701: potentially uninitialized local variable 'lbounds' used 
  \mapserver\mapdraw.c(2395): warning C4701: potentially uninitialized local variable 'p' used 
  \mapserver\mapdraw.c(3484): warning C4701: potentially uninitialized local variable 'starttime' used 
  \mapserver\mapdraw.c(3428): warning C4701: potentially uninitialized local variable 'labelpoly_bounds' used 
  \mapserver\mapdraw.c(583): warning C4701: potentially uninitialized local variable 'mapstarttime' used 
  \mapserver\mapdraw.c(343): warning C4701: potentially uninitialized local variable 'starttime' used 
  \mapserver\mapprimitive.c(1024): warning C4701: potentially uninitialized local variable 'x0' used 
  \mapserver\mapprimitive.c(1025): warning C4701: potentially uninitialized local variable 'y0' used 
  \mapserver\mapresample.c(1497): warning C4701: potentially uninitialized local variable 'sSrcExtent' used 
  \mapserver\mapmetadata.c(365): warning C4701: potentially uninitialized local variable 'n' used 
  \mapserver\mapfile.c(6458): warning C4701: potentially uninitialized local variable 'starttime' used 
  \mapserver\mapfile.c(6580): warning C4701: potentially uninitialized local variable 'starttime' used 
  \mapserver\mapogcfilter.c(1280): warning C4701: potentially uninitialized local variable 'sBox' used 
  \mapserver\maprasterquery.c(1366): warning C4701: potentially uninitialized local variable 'nXSize' used 
  \mapserver\maprasterquery.c(1360): warning C4701: potentially uninitialized local variable 'nYSize' used 
  \mapserver\maprasterquery.c(1010): warning C4701: potentially uninitialized local variable 'previous_maxresults' used 
  \mapserver\mapuvraster.c(876): warning C4701: potentially uninitialized local variable 'nXSize' used 
  \mapserver\mapuvraster.c(870): warning C4701: potentially uninitialized local variable 'nYSize' used 
  \mapserver\mapuvraster.c(642): warning C4701: potentially uninitialized local variable 'oldLayerExtent' used 
  \mapserver\mapuvraster.c(643): warning C4701: potentially uninitialized local variable 'oldLayerProjection' used 
  \mapserver\mapdrawgdal.c(2137): warning C4701: potentially uninitialized local variable 'starttime' used 
  \mapserver\maputil.c(996): warning C4701: potentially uninitialized local variable 'starttime' used 
  \mapserver\maputil.c(2719): warning C4701: potentially uninitialized local variable 'dX0' used 
  \mapserver\maputil.c(2720): warning C4701: potentially uninitialized local variable 'dY0' used 
  \mapserver\maputil.c(1897): warning C4701: potentially uninitialized local variable 'old_pt' used 
  \mapserver\mapscale.c(283): warning C4701: potentially uninitialized local variable 'strokeStyle' used

@geographika geographika changed the title Add /w14701 flag Add /w14701 compiler check for potentially uninitialized local variables Jan 15, 2020
@rouault
Copy link
Contributor

rouault commented Jan 17, 2020

Addressed per #5978 which fixes the warnings

@rouault rouault closed this Jan 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants