Commit e6a4890c authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Init variables.

parent 53b12691
...@@ -604,7 +604,7 @@ static int ...@@ -604,7 +604,7 @@ static int
get_ifilevalue_code(int vlistID, const char *value, int nvars) get_ifilevalue_code(int vlistID, const char *value, int nvars)
{ {
int code = atoi(value); int code = atoi(value);
if ( code && code < 1000 ) if ( code > 0 && code < 1000 )
{ {
char newcode[4]; char newcode[4];
sprintf(newcode, "%03d", code); sprintf(newcode, "%03d", code);
...@@ -957,9 +957,9 @@ addcharvar(keyValues_t *charvars, int vlistID, const char *key, struct mapping v ...@@ -957,9 +957,9 @@ addcharvar(keyValues_t *charvars, int vlistID, const char *key, struct mapping v
} }
int gridID = vlistInqVarGrid(vlistID, varIDs[0]); int gridID = vlistInqVarGrid(vlistID, varIDs[0]);
int subgridID; int subgridID = -1;
int zaxisID = vlistInqVarZaxis(vlistID, varIDs[0]); int zaxisID = vlistInqVarZaxis(vlistID, varIDs[0]);
int subzaxisID; int subzaxisID = -1;
int ntsteps = vlistNtsteps(vlistID); int ntsteps = vlistNtsteps(vlistID);
if (cdoStreamIsPipe(0)) if (cdoStreamIsPipe(0))
...@@ -2834,7 +2834,7 @@ register_z_axis(list_t *kvl, int vlistID, int varID, int zaxisID, char *varname, ...@@ -2834,7 +2834,7 @@ register_z_axis(list_t *kvl, int vlistID, int varID, int zaxisID, char *varname,
} }
else if (zaxisInqType(zaxisID) == ZAXIS_HYBRID || zaxisInqType(zaxisID) == ZAXIS_HYBRID_HALF) else if (zaxisInqType(zaxisID) == ZAXIS_HYBRID || zaxisInqType(zaxisID) == ZAXIS_HYBRID_HALF)
{ {
double *alev_val, *alev_bnds, *ap_val, *ap_bnds, *b_val, *b_bnds; double *alev_val, *alev_bnds = nullptr, *ap_val, *ap_bnds = nullptr, *b_val, *b_bnds = nullptr;
double *p0 = (double *) Malloc(sizeof(double)); double *p0 = (double *) Malloc(sizeof(double));
p0[0] = 101325.0; p0[0] = 101325.0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment