Commit 482bf465 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Fix cppcheck warnings.

parent ac9c1562
......@@ -223,7 +223,6 @@ int AsyncWorker_finalize(AsyncManager *jobManager)
free(jobManager->communicators);
free(jobManager);
jobManager = NULL;
return result;
}
......@@ -190,7 +190,7 @@ int main(void)
vdate0 = -80001201;
vtime0 = 120500;
printf("start time: %8d %4d\n", vdate0, vtime0);
printf("start time: %8ld %4d\n", vdate0, vtime0);
for ( i = 0; i < nmin; i++ )
{
......@@ -204,7 +204,7 @@ int main(void)
vtime = sec_to_time(secofday);
if ( vdate0 != vdate || vtime0 != vtime )
printf("%4d %8d %4d %8d %4d %9d %9d\n",
printf("%4d %8ld %4d %8ld %4d %9d %9d\n",
++j, vdate0, vtime0, vdate, vtime, calday, secofday);
year++;
......@@ -212,7 +212,7 @@ int main(void)
vtime0 = cdiEncodeTime(hour, minute, second);
}
printf("stop time: %8d %4d\n", vdate0, vtime0);
printf("stop time: %8ld %4d\n", vdate0, vtime0);
/* 2 - Check time increment of one minute */
......@@ -221,7 +221,7 @@ int main(void)
vdate0 = 20001201;
vtime0 = 0;
printf("start time: %8d %4d\n", vdate0, vtime0);
printf("start time: %8ld %4d\n", vdate0, vtime0);
calday = date_to_calday(calendar, vdate0);
secofday = time_to_sec(vtime0);
......@@ -256,13 +256,13 @@ int main(void)
vdate = calday_to_date(calendar, calday);
vtime = sec_to_time(secofday);
if ( vdate0 != vdate || vtime0 != vtime )
printf("%4d %8d %4d %8d %4d %9d %9d\n",
printf("%4d %8ld %4d %8ld %4d %9d %9d\n",
++j, vdate0, vtime0, vdate, vtime, calday, secofday);
}
printf("stop time: %8d %4d\n", vdate0, vtime0);
printf("stop time: %8ld %4d\n", vdate0, vtime0);
return (0);
return 0;
}
#endif
......@@ -297,7 +297,7 @@ int main(void)
julday_add_seconds(value*factor, &calday, &secofday);
}
return (0);
return 0;
}
#endif
/*
......
......@@ -472,7 +472,6 @@ void cdfDefineCoordinates(const stream_t *streamptr, int ncvarID, int nczvarID,
}
else if ( gridtype == GRID_UNSTRUCTURED || gridtype == GRID_CURVILINEAR )
{
char cellarea[CDI_MAX_NAME] = "area: ";
const int ncxvarID = streamptr->ncgrid[gridindex].ncIDs[CDF_VARID_X];
const int ncyvarID = streamptr->ncgrid[gridindex].ncIDs[CDF_VARID_Y];
const int ncavarID = streamptr->ncgrid[gridindex].ncIDs[CDF_VARID_A];
......@@ -490,6 +489,7 @@ void cdfDefineCoordinates(const stream_t *streamptr, int ncvarID, int nczvarID,
if ( ncavarID != CDI_UNDEFID )
{
char cellarea[CDI_MAX_NAME] = "area: ";
size_t len = strlen(cellarea);
cdf_inq_varname(fileID, ncavarID, cellarea+len);
len = strlen(cellarea);
......
......@@ -571,7 +571,7 @@ int cdiInqKeyString(int cdiID, int varID, int key, char *string, int *length)
string[0] = '\0';
int status = cdiInqKeyBytes(cdiID, varID, key, (unsigned char *) string, length);
if (status != CDI_NOERR) length = 0;
if (status != CDI_NOERR) *length = 0;
return status;
}
......
......@@ -246,7 +246,6 @@ int memListNewEntry(int mtype, void *ptr, size_t size, size_t nobj,
const char *functionname, const char *file, int line)
{
static int item = 0;
size_t memSize = 0;
size_t memID = 0;
/*
......@@ -256,7 +255,7 @@ int memListNewEntry(int mtype, void *ptr, size_t size, size_t nobj,
if ( memTableSize == 0 )
{
memTableSize = 8;
memSize = memTableSize * sizeof(MemTable_t);
size_t memSize = memTableSize * sizeof(MemTable_t);
memTable = (MemTable_t *) malloc(memSize);
if( memTable == NULL ) memError(__func__, __FILE__, __LINE__, memSize);
......@@ -277,7 +276,7 @@ int memListNewEntry(int mtype, void *ptr, size_t size, size_t nobj,
if ( memID == memTableSize )
{
memTableSize = 2*memTableSize;
memSize = memTableSize*sizeof(MemTable_t);
size_t memSize = memTableSize*sizeof(MemTable_t);
memTable = (MemTable_t*) realloc(memTable, memSize);
if ( memTable == NULL ) memError(__func__, __FILE__, __LINE__, memSize);
......
......@@ -55,16 +55,14 @@ void extLibInit()
char *envString = getenv(envName);
if ( envString )
{
int pos = 0;
if ( strlen(envString) == 2 )
{
switch ( tolower((int) envString[pos]) )
switch ( tolower((int) envString[0]) )
{
case 'r':
{
extDefaultNumber = EXT_REAL;
switch ( (int) envString[pos+1] )
switch ( (int) envString[1] )
{
case '4': extDefaultPrec = EXSE_SINGLE_PRECISION; break;
case '8': extDefaultPrec = EXSE_DOUBLE_PRECISION; break;
......@@ -76,7 +74,7 @@ void extLibInit()
case 'c':
{
extDefaultNumber = EXT_COMP;
switch ( (int) envString[pos+1] )
switch ( (int) envString[1] )
{
case '4': extDefaultPrec = EXSE_SINGLE_PRECISION; break;
case '8': extDefaultPrec = EXSE_DOUBLE_PRECISION; break;
......@@ -363,11 +361,10 @@ int extDefDataDP(void *ext, const double *data)
int extRead(int fileID, void *ext)
{
extrec_t *extp = (extrec_t *) ext;
int status;
if ( ! extp->checked )
{
status = extCheckFiletype(fileID, &extp->byteswap);
int status = extCheckFiletype(fileID, &extp->byteswap);
if ( status == 0 ) Error("Not a EXTRA file!");
extp->checked = 1;
}
......
......@@ -646,12 +646,10 @@ static
long file_getenv(const char *envName)
{
long envValue = -1;
long fact = 1;
char *envString = getenv(envName);
if ( envString )
{
long fact = 1;
for ( int loop = 0; loop < (int) strlen(envString); loop++ )
{
if ( ! isdigit((int) envString[loop]) )
......
......@@ -82,9 +82,10 @@ getline(char **linebuf, size_t *linebuf_size, FILE *fp)
}
status = len > SSIZE_MAX ? SSIZE_MAX : (ssize_t)len;
}
if (linebuf_size)
*linebuf_size = buf_size;
*linebuf_size = buf_size;
*linebuf = buf;
return status;
}
......
......@@ -27,7 +27,7 @@ cdiPioClientStreamOpen(const char *filename, char filemode,
int recordBufIsToBeCreated)
{
(void)streamptr; (void)recordBufIsToBeCreated;
int fileID;
int fileID = 0;
if ( filemode == 'w' )
{
MPI_Comm comm = cdiPioInqInterComm();
......
......@@ -97,6 +97,7 @@ int dbuffer_init ( struct dBuffer **dbuffer, size_t size )
if ( db->buffer == NULL )
{
perror ( "Not enough memory" );
free(db);
return 1 ;
}
#endif
......
......@@ -372,11 +372,10 @@ int srvRead(int fileID, void *srv)
INT32 i32[SRV_HEADER_LEN];
INT64 i64[SRV_HEADER_LEN];
} tempheader;
int status;
if ( ! srvp->checked )
{
status = srvCheckFiletype(fileID, &srvp->byteswap);
int status = srvCheckFiletype(fileID, &srvp->byteswap);
if ( status == 0 ) Error("Not a SERVICE file!");
srvp->checked = 1;
}
......
......@@ -2317,7 +2317,6 @@ bool cdf_read_coordinates(struct cdfLazyGrid *restrict lazyGrid, ncvar_t *ncvar,
}
else
{
static bool ltwarn = true;
size_t start[3], count[3];
int ntdims = 0;
......@@ -2336,6 +2335,7 @@ bool cdf_read_coordinates(struct cdfLazyGrid *restrict lazyGrid, ncvar_t *ncvar,
{
if ( ncvars[xvarid].dimids[0] == timedimid && ncvars[yvarid].dimids[0] == timedimid )
{
static bool ltwarn = true;
size_t ntsteps = 0;
cdf_inq_dimlen(ncvar->ncid, ncdims[timedimid].dimid, &ntsteps);
if ( ltwarn && ntsteps > 1 ) Warning("Time varying grids unsupported, using grid at time step 1!");
......@@ -3858,7 +3858,6 @@ int cdfInqContents(stream_t *streamptr)
#ifdef HAVE_NETCDF4
if ( format == NC_FORMAT_NETCDF4 )
{
int ncid;
int numgrps = 0;
int ncids[NC_MAX_VARS];
char gname[CDI_MAX_NAME];
......@@ -3866,7 +3865,7 @@ int cdfInqContents(stream_t *streamptr)
nc_inq_grps(fileID, &numgrps, ncids);
for ( int i = 0; i < numgrps; ++i )
{
ncid = ncids[i];
int ncid = ncids[i];
nc_inq_grpname(ncid, gname);
cdf_inq(ncid, &gndims , &gnvars, &gngatts, &gunlimdimid);
......@@ -3888,7 +3887,7 @@ int cdfInqContents(stream_t *streamptr)
}
// alloc ncvars
ncvar_t *ncvars = nvars ? (ncvar_t *) Malloc((size_t)nvars * sizeof (ncvar_t)) : NULL;
ncvar_t *ncvars = (ncvar_t *) Malloc((size_t)nvars * sizeof (ncvar_t));
init_ncvars(nvars, ncvars);
for ( ncvarid = 0; ncvarid < nvars; ++ncvarid ) ncvars[ncvarid].ncid = fileID;
......
......@@ -1831,7 +1831,6 @@ static
void cdfDefGdim(stream_t *streamptr, int gridID, int gridindex)
{
ncgrid_t *ncgrid = streamptr->ncgrid;
int iz = 0;
int dimID = CDI_UNDEFID;
const size_t dimlen = gridInqSize(gridID);
......@@ -1841,7 +1840,6 @@ void cdfDefGdim(stream_t *streamptr, int gridID, int gridindex)
struct idSearch search
= cdfSearchIDBySize(0, (size_t)gridindex, ncgrid, CDF_DIMID_X,
GRID_GENERIC, (int)dimlen, gridInqType, gridInqSize);
iz = search.numNonMatching;
dimID = search.foundID;
}
......@@ -1850,7 +1848,6 @@ void cdfDefGdim(stream_t *streamptr, int gridID, int gridindex)
struct idSearch search
= cdfSearchIDBySize(0, (size_t)gridindex, ncgrid, CDF_DIMID_Y,
GRID_GENERIC, (int)dimlen, gridInqType, gridInqSize);
iz += search.numNonMatching;
dimID = search.foundID;
}
......
......@@ -1520,7 +1520,6 @@ static
void cgribexDefTime(int *isec1, int vdate, int vtime, int tsteptype, int numavg, int taxisID)
{
int timetype = TAXIS_ABSOLUTE;
int timerange = 0;
int timeunit = TUNIT_HOUR;
if ( taxisID != -1 )
......@@ -1546,7 +1545,7 @@ void cgribexDefTime(int *isec1, int vdate, int vtime, int tsteptype, int numavg,
int factor = cgribexDefDateTime(isec1, timeunit, rdate, rtime);
int ip1 = 0, ip2 = 0;
timerange = cgribexDefTimerange(tsteptype, factor, calendar, rdate, rtime, vdate, vtime, sdate, stime, &ip1, &ip2);
int timerange = cgribexDefTimerange(tsteptype, factor, calendar, rdate, rtime, vdate, vtime, sdate, stime, &ip1, &ip2);
if ( ip2 > 0xFF && timeunit < TUNIT_YEAR )
{
......@@ -1846,7 +1845,6 @@ static
void cgribexDefLevel(int *isec1, int *isec2, double *fsec2, int zaxisID, int levelID)
{
char units[CDI_MAX_NAME];
static bool lwarning_vct = true;
int zaxistype = zaxisInqType(zaxisID);
int ltype = 0;
......@@ -1897,6 +1895,7 @@ void cgribexDefLevel(int *isec1, int *isec2, double *fsec2, int zaxisID, int lev
int vctsize = zaxisInqVctSize(zaxisID);
if ( vctsize > 255 )
{
static bool lwarning_vct = true;
ISEC2_NumVCP = 0;
if ( lwarning_vct )
{
......
......@@ -323,7 +323,6 @@ static
void iegDefLevel(int *pdb, int *gdb, double *vct, int zaxisID, int levelID)
{
double level;
int ilevel;
int leveltype = zaxisInqType(zaxisID);
if ( leveltype == ZAXIS_GENERIC )
......@@ -383,7 +382,7 @@ void iegDefLevel(int *pdb, int *gdb, double *vct, int zaxisID, int levelID)
if ( memcmp(units, "hPa", 3) == 0 || memcmp(units, "mb",2 ) == 0 )
level = level*100;
ilevel = (int) level;
int ilevel = (int) level;
if ( level < 32768 && (level < 100 || modf(level/100, &dum) > 0) )
pdbDefLevel(pdb, IEG_LTYPE_99, 0, ilevel);
else
......
......@@ -184,7 +184,7 @@ int main(void)
int64_t vdate0, vdate;
int vtime0, vtime;
int ijulinc;
int i, j = 0;
int j = 0;
int year, mon, day, hour, minute, second;
int64_t julday;
int secofday;
......@@ -196,9 +196,9 @@ int main(void)
vdate0 = -80001201;
vtime0 = 120500;
printf("start time: %8d %4d\n", vdate0, vtime0);
printf("start time: %8ld %4d\n", vdate0, vtime0);
for ( i = 0; i < nmin; i++ )
for ( int i = 0; i < nmin; i++ )
{
cdiDecodeDate(vdate0, &year, &mon, &day);
cdiDecodeTime(vtime0, &hour, &minute, &second);
......@@ -210,7 +210,7 @@ int main(void)
vtime = sec_to_time(secofday);
if ( vdate0 != vdate || vtime0 != vtime )
printf("%4d %8d %4d %8d %4d %9d %9d\n",
printf("%4d %8ld %4d %8ld %4d %9d %9d\n",
++j, vdate0, vtime0, vdate, vtime, julday, secofday);
year++;
......@@ -218,7 +218,7 @@ int main(void)
vtime0 = cdiEncodeTime(hour, minute, second);
}
printf("stop time: %8d %4d\n", vdate0, vtime0);
printf("stop time: %8ld %4d\n", vdate0, vtime0);
/* 2 - Check time increment of one minute */
......@@ -227,11 +227,11 @@ int main(void)
vdate0 = 20001201;
vtime0 = 0;
printf("start time: %8d %4d\n", vdate0, vtime0);
printf("start time: %8ld %4d\n", vdate0, vtime0);
julday = date_to_julday(calendar, vdate0);
secofday = time_to_sec(vtime0);
for ( i = 0; i < nmin; i++ )
for ( int i = 0; i < nmin; i++ )
{
cdiDecodeDate(vdate0, &year, &mon, &day);
cdiDecodeTime(vtime0, &hour, &minute, &second);
......@@ -262,13 +262,13 @@ int main(void)
vdate = julday_to_date(calendar, julday);
vtime = sec_to_time(secofday);
if ( vdate0 != vdate || vtime0 != vtime )
printf("%4d %8d %4d %8d %4d %9d %9d\n",
printf("%4d %8ld %4d %8ld %4d %9d %9d\n",
++j, vdate0, vtime0, vdate, vtime, julday, secofday);
}
printf("stop time: %8d %4d\n", vdate0, vtime0);
printf("stop time: %8ld %4d\n", vdate0, vtime0);
return (0);
return 0;
}
#endif
......@@ -276,7 +276,6 @@ int main(void)
#ifdef TEST2
int main(void)
{
int i;
int julday, secofday;
int year, month, day, hour, minute, second;
int value = 30;
......@@ -292,7 +291,7 @@ int main(void)
decode_juldaysec(calendar, julday, secofday, &year, &month, &day, &hour, &minute, &second);
printf("%d/%02d/%02d %02d:%02d:%02d %d %d\n", year, month, day, hour, minute, second, julday, secofday);
for ( i = 0; i < 420; i++ )
for ( int i = 0; i < 420; i++ )
{
decode_juldaysec(calendar, julday, secofday, &year, &month, &day, &hour, &minute, &second);
......@@ -300,7 +299,7 @@ int main(void)
julday_add_seconds(value*factor, &julday, &secofday);
}
return (0);
return 0;
}
#endif
/*
......
......@@ -1085,8 +1085,6 @@ int vlistNtsteps(int vlistID)
static
void vlistPrintKernel(vlist_t *vlistptr, FILE *fp)
{
char paramstr[32];
fprintf ( fp, "#\n# vlistID %d\n#\n", vlistptr->self);
int nvars = vlistptr->nvars;
......@@ -1119,6 +1117,7 @@ void vlistPrintKernel(vlist_t *vlistptr, FILE *fp)
int flag = vlistptr->vars[varID].flag;
int iorank = vlistptr->vars[varID].iorank;
char paramstr[32];
cdiParamToString(param, paramstr, sizeof(paramstr));
fprintf(fp, "%6d %-8s %6d %6d %6d %6d %5d %6d %-8s %s [%s]\n",
varID, paramstr, gridID, zaxisID, subtypeID, tsteptype, flag, iorank,
......@@ -1149,8 +1148,7 @@ void vlistPrintKernel(vlist_t *vlistptr, FILE *fp)
double level = zaxisInqLevels(zaxisID, NULL) ? zaxisInqLevel(zaxisID, levID) : levID+1;
fprintf(fp, "%6d %6d %6d %6d %6d %6d %6d %6d %5d %.9g\n",
varID, levID, fvarID, flevID, mvarID, mlevID, index,
dtype, flag, level);
varID, levID, fvarID, flevID, mvarID, mlevID, index, dtype, flag, level);
}
}
......@@ -1158,8 +1156,7 @@ void vlistPrintKernel(vlist_t *vlistptr, FILE *fp)
" varID size iorank\n", fp);
for ( int varID = 0; varID < nvars; varID++ )
fprintf(fp, "%3d %8zu %6d\n", varID,
zaxisInqSize(vlistptr->vars[varID].zaxisID)
* gridInqSize(vlistptr->vars[varID].gridID),
zaxisInqSize(vlistptr->vars[varID].zaxisID) * gridInqSize(vlistptr->vars[varID].gridID),
vlistptr->vars[varID].iorank);
}
}
......@@ -1217,7 +1214,6 @@ The function @func{vlistInqTaxis} returns the time axis of a variable list.
int vlistInqTaxis(int vlistID)
{
vlist_t *vlistptr = vlist_to_pointer(vlistID);
return vlistptr->taxisID;
}
......@@ -1237,7 +1233,6 @@ void vlistDefTable(int vlistID, int tableID)
int vlistInqTable(int vlistID)
{
vlist_t *vlistptr = vlist_to_pointer(vlistID);
return vlistptr->tableID;
}
......
......@@ -727,9 +727,8 @@ The function @func{zaxisInqLevel} returns one level of a Z-axis.
*/
double zaxisInqLevel(int zaxisID, int levelID)
{
zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID);
double level = 0;
zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID);
if ( zaxisptr->vals && levelID >= 0 && levelID < zaxisptr->size )
level = zaxisptr->vals[levelID];
......@@ -739,9 +738,8 @@ double zaxisInqLevel(int zaxisID, int levelID)
double zaxisInqLbound(int zaxisID, int levelID)
{
zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID);
double level = 0;
zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID);
if ( zaxisptr->lbounds && levelID >= 0 && levelID < zaxisptr->size )
level = zaxisptr->lbounds[levelID];
......@@ -751,9 +749,8 @@ double zaxisInqLbound(int zaxisID, int levelID)
double zaxisInqUbound(int zaxisID, int levelID)
{
zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID);
double level = 0;
zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID);
if ( zaxisptr->ubounds && levelID >= 0 && levelID < zaxisptr->size )
level = zaxisptr->ubounds[levelID];
......@@ -813,10 +810,9 @@ int zaxisInqLevels(int zaxisID, double *levels)
int zaxisInqCLen(int zaxisID)
{
zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID);
int clen = 0;
#ifndef USE_MPI
zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID);
if ( zaxisptr->cvals && zaxisptr->clength)
clen = zaxisptr->clength;
#endif
......@@ -827,10 +823,9 @@ int zaxisInqCLen(int zaxisID)
int zaxisInqCVals(int zaxisID, char ***clevels)
{
zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID);
int size = 0;
#ifndef USE_MPI
zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID);
if ( zaxisptr->cvals )
{
size = zaxisptr->size;
......@@ -853,9 +848,8 @@ int zaxisInqCVals(int zaxisID, char ***clevels)
int zaxisInqLbounds(int zaxisID, double *lbounds)
{
zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID);
int size = 0;
zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID);
if ( zaxisptr->lbounds )
{
size = zaxisptr->size;
......@@ -871,9 +865,8 @@ int zaxisInqLbounds(int zaxisID, double *lbounds)
int zaxisInqUbounds(int zaxisID, double *ubounds)
{
zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID);
int size = 0;
zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID);
if ( zaxisptr->ubounds )
{
size = zaxisptr->size;
......@@ -889,9 +882,8 @@ int zaxisInqUbounds(int zaxisID, double *ubounds)
int zaxisInqWeights(int zaxisID, double *weights)
{
zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID);
int size = 0;
zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID);
if ( zaxisptr->weights )
{
size = zaxisptr->size;
......@@ -907,9 +899,8 @@ int zaxisInqWeights(int zaxisID, double *weights)
int zaxisInqLevelID(int zaxisID, double level)
{
zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID);
int levelID = CDI_UNDEFID;
zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID);
if ( zaxisptr->vals )
{
const int size = zaxisptr->size;
......@@ -1024,7 +1015,7 @@ void zaxisDefVct(int zaxisID, int size, const double *vct)
zaxisptr->vct = (double *) Realloc(zaxisptr->vct, (size_t)size*sizeof(double));
}
memcpy(zaxisptr->vct, vct, (size_t)size*sizeof(double));
if (vct) memcpy(zaxisptr->vct, vct, (size_t)size*sizeof(double));
reshSetStatus(zaxisID, &zaxisOps, RESH_DESYNC_IN_USE);
}
......@@ -1057,13 +1048,13 @@ void zaxisDefLbounds(int zaxisID, const double *lbounds)
const size_t size = (size_t)zaxisptr->size;
if ( CDI_Debug )
if ( zaxisptr->lbounds != NULL )
if ( zaxisptr->lbounds )
Warning("Lower bounds already defined for zaxisID = %d", zaxisID);
if ( zaxisptr->lbounds == NULL )
zaxisptr->lbounds = (double *) Malloc(size*sizeof(double));
memcpy(zaxisptr->lbounds, lbounds, size*sizeof(double));
if (lbounds) memcpy(zaxisptr->lbounds, lbounds, size*sizeof(double));
reshSetStatus(zaxisID, &zaxisOps, RESH_DESYNC_IN_USE);
}
......@@ -1075,13 +1066,13 @@ void zaxisDefUbounds(int zaxisID, const double *ubounds)
const size_t size = (size_t)zaxisptr->size;
if ( CDI_Debug )
if ( zaxisptr->ubounds != NULL )
if ( zaxisptr->ubounds )
Warning("Upper bounds already defined for zaxisID = %d", zaxisID);
if ( zaxisptr->ubounds == NULL )
zaxisptr->ubounds = (double *) Malloc(size*sizeof(double));