Permalink
Browse files

mapwcs20: keep compiler happy about (im)possible use of uninitialized…

… memory
  • Loading branch information...
gogglesguy committed Aug 20, 2018
1 parent d18302b commit 0bf81bb61f8354dbf3cc4c1f68fcf0182df6405d
Showing with 5 additions and 1 deletion.
  1. +5 −1 mapwcs20.c
@@ -2806,7 +2806,6 @@ static int msWCSGetCoverageMetadata20(layerObj *layer, wcs20coverageMetadataObj
/* set default values for interval and significant figures */
switch(cm->imagemode) {
case MS_IMAGEMODE_BYTE:
case MS_IMAGEMODE_PC256:
default_values.interval_min = 0.;
default_values.interval_max = 255.;
default_values.significant_figures = 3;
@@ -2821,6 +2820,11 @@ static int msWCSGetCoverageMetadata20(layerObj *layer, wcs20coverageMetadataObj
default_values.interval_max = FLT_MAX;
default_values.significant_figures = 12;
break;
default:
// other imagemodes are invalid (see above), just keep the compiler happy
msFreeCharArray(band_names, num_band_names);
return MS_FAILURE;
break;
}
/* lookup default interval values */

0 comments on commit 0bf81bb

Please sign in to comment.