Skip to content

Commit

Permalink
CF.cpp: prevention of compiler warnings for -O2
Browse files Browse the repository at this point in the history
  • Loading branch information
h-dh committed Oct 1, 2015
1 parent 0e676a0 commit ebeec1f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/CF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ CF::checkCoordinateValues(Variable& var, bool isFormTermAux, T x)
if( var.dimName.size() > 1 )
return;

double sig;
double sig=1.;
for( size_t j=0 ; j < mv.validRangeBegin.size() ; ++j )
{
// start at [1], because of the difference below
Expand Down Expand Up @@ -3985,7 +3985,10 @@ CF::chap2_4_reco(void)
void
CF::chap2_5_1(void)
{
double minVal, maxVal, range[2];
// for preventing compiler warnings for -O2
double minVal=0.;
double maxVal=0.;
double range[] = { 0., 0.};

// missing data
for( size_t ix=0 ; ix < pIn->varSz ; ++ix )
Expand Down Expand Up @@ -8544,7 +8547,7 @@ CF::chap7_3_4b(Variable& var,
|| x_cm_name[x] == n_latitude) )
{
std::string meaning;
std::string *kind;
std::string *kind=0; // for preventing compiler warnings when -O2

int i_lat, i_lon;
i_lat = i_lon = -1 ;
Expand Down

0 comments on commit ebeec1f

Please sign in to comment.