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

cast result of malloc

parent bc590a12
......@@ -112,7 +112,7 @@ void *Output(void *argument)
for ( i = 0; i < npar; i++ )
printf("key %d = %s\n", i+1, parnames[i]);
keys = malloc(npar*sizeof(int));
keys = (int*) malloc(npar*sizeof(int));
nkeys = 0;
nKeys = sizeof(Keynames)/sizeof(char *);
for ( i = 0; i < npar; i++ )
......@@ -156,7 +156,7 @@ void *Output(void *argument)
gridsize = gridInqSize(gridID);
gridtype = gridInqType(gridID);
array = malloc(gridsize*sizeof(double));
array = (double*) malloc(gridsize*sizeof(double));
if ( operatorID == OUTPUTFLD || operatorID == OUTPUTXYZ || operatorID == OUTPUTTAB )
{
......@@ -167,8 +167,8 @@ void *Output(void *argument)
gridtype = gridInqType(gridID);
grid_center_lon = malloc(gridsize*sizeof(double));
grid_center_lat = malloc(gridsize*sizeof(double));
grid_center_lon = (double*) malloc(gridsize*sizeof(double));
grid_center_lat = (double*) malloc(gridsize*sizeof(double));
gridInqXvals(gridID, grid_center_lon);
gridInqYvals(gridID, grid_center_lat);
......
......@@ -163,7 +163,7 @@ void verify_grid(int gridtype, int gridsize, int ncorner,
double lon_bounds[MAX_CORNERS], lat_bounds[MAX_CORNERS];
double area, sumarea;
alone_cell = malloc(gridsize*ncorner*sizeof(int));
alone_cell = (int*) malloc(gridsize*ncorner*sizeof(int));
check_corners = 0; /* don't execute corner checking (last loop) */
nout = 0;
......@@ -671,7 +671,7 @@ void *Outputgmt(void *argument)
if ( gridInqMaskGME(gridID, NULL) )
{
grid_mask = malloc(gridsize*sizeof(int));
grid_mask = (int*) malloc(gridsize*sizeof(int));
gridInqMaskGME(gridID, grid_mask);
}
......@@ -709,8 +709,8 @@ void *Outputgmt(void *argument)
grid_is_circular = gridIsCircular(gridID);
grid_center_lat = malloc(gridsize*sizeof(double));
grid_center_lon = malloc(gridsize*sizeof(double));
grid_center_lat = (double*) malloc(gridsize*sizeof(double));
grid_center_lon = (double*) malloc(gridsize*sizeof(double));
gridInqYvals(gridID, grid_center_lat);
gridInqXvals(gridID, grid_center_lon);
......@@ -731,8 +731,8 @@ void *Outputgmt(void *argument)
gridsize2 = nlat*(nlon+1);
grid_center_lat2 = malloc(gridsize2*sizeof(double));
grid_center_lon2 = malloc(gridsize2*sizeof(double));
grid_center_lat2 = (double*) malloc(gridsize2*sizeof(double));
grid_center_lon2 = (double*) malloc(gridsize2*sizeof(double));
make_cyclic(grid_center_lat, grid_center_lat2, nlon, nlat);
make_cyclic(grid_center_lon, grid_center_lon2, nlon, nlat);
......@@ -748,9 +748,9 @@ void *Outputgmt(void *argument)
plat = grid_center_lat2;
}
zaxis_center_lev = malloc(nlev*sizeof(double));
zaxis_lower_lev = malloc(nlev*sizeof(double));
zaxis_upper_lev = malloc(nlev*sizeof(double));
zaxis_center_lev = (double*) malloc(nlev*sizeof(double));
zaxis_lower_lev = (double*) malloc(nlev*sizeof(double));
zaxis_upper_lev = (double*) malloc(nlev*sizeof(double));
zaxisInqLevels(zaxisID, zaxis_center_lev);
......@@ -808,21 +808,21 @@ void *Outputgmt(void *argument)
}
}
array = malloc(gridsize*sizeof(double));
array = (double*) malloc(gridsize*sizeof(double));
parray = array;
if ( operatorID == OUTPUTCENTER2 && grid_is_circular )
{
array2 = malloc(nlat*(nlon+1)*sizeof(double));
array2 = (double*) malloc(nlat*(nlon+1)*sizeof(double));
parray = array2;
}
if ( operatorID == OUTPUTVECTOR )
{
uf = malloc(gridsize*sizeof(double));
vf = malloc(gridsize*sizeof(double));
alpha = malloc(gridsize*sizeof(double));
auv = malloc(gridsize*sizeof(double));
uf = (double*) malloc(gridsize*sizeof(double));
vf = (double*) malloc(gridsize*sizeof(double));
alpha = (double*) malloc(gridsize*sizeof(double));
auv = (double*) malloc(gridsize*sizeof(double));
}
if ( operatorID == GRIDVERIFY )
......
......@@ -129,7 +129,7 @@ void *Pack(void *argument)
streamInqRecord(streamID1, &varID, &levelID);
gridID = vlistInqVarGrid(vlistID1, varID);
gridsize = gridInqSize(gridID);
vars[tsID][varID][levelID].ptr = malloc(gridsize*sizeof(double));
vars[tsID][varID][levelID].ptr = (double*) malloc(gridsize*sizeof(double));
streamReadRecord(streamID1, vars[tsID][varID][levelID].ptr, &nmiss);
vars[tsID][varID][levelID].nmiss = nmiss;
}
......
......@@ -74,8 +74,8 @@ void *Pinfo(void *argument)
gridsize = vlistGridsizeMax(vlistID1);
array1 = malloc(gridsize*sizeof(double));
array2 = malloc(gridsize*sizeof(double));
array1 = (double*) malloc(gridsize*sizeof(double));
array2 = (double*) malloc(gridsize*sizeof(double));
indg = 0;
tsID = 0;
......
......@@ -70,15 +70,15 @@ void *Regres(void *argument)
nrecords = vlistNrecs(vlistID1);
recVarID = malloc(nrecords*sizeof(int));
recLevelID = malloc(nrecords*sizeof(int));
recVarID = (int*) malloc(nrecords*sizeof(int));
recLevelID = (int*) malloc(nrecords*sizeof(int));
gridsize = vlistGridsizeMax(vlistID1);
field_init(&field1);
field_init(&field2);
field1.ptr = malloc(gridsize*sizeof(double));
field2.ptr = malloc(gridsize*sizeof(double));
field1.ptr = (double*) malloc(gridsize*sizeof(double));
field2.ptr = (double*) malloc(gridsize*sizeof(double));
for ( w = 0; w < nwork; w++ )
work[w] = field_calloc(vlistID1, FIELD_PTR);
......
......@@ -563,7 +563,7 @@ void *Remap(void *argument)
vlistDefTaxis(vlistID2, taxisID2);
ngrids = vlistNgrids(vlistID1);
remapgrids = malloc(ngrids*sizeof(short));
remapgrids = (short*) malloc(ngrids*sizeof(short));
for ( index = 0; index < ngrids; index++ )
{
remapgrids[index] = TRUE;
......@@ -622,7 +622,7 @@ void *Remap(void *argument)
if ( max_remaps > 0 )
{
remaps = malloc(max_remaps*sizeof(remap_t));
remaps = (remap_t*) malloc(max_remaps*sizeof(remap_t));
for ( r = 0; r < max_remaps; r++ )
{
remaps[r].gridID = -1;
......@@ -741,16 +741,16 @@ void *Remap(void *argument)
if ( need_gradiants )
{
grad1_lat = malloc(grid1sizemax*sizeof(double));
grad1_lon = malloc(grid1sizemax*sizeof(double));
grad1_latlon = malloc(grid1sizemax*sizeof(double));
grad1_lat = (double*) malloc(grid1sizemax*sizeof(double));
grad1_lon = (double*) malloc(grid1sizemax*sizeof(double));
grad1_latlon = (double*) malloc(grid1sizemax*sizeof(double));
}
array1 = malloc(grid1sizemax*sizeof(double));
imask = malloc(grid1sizemax*sizeof(int));
array1 = (double*) malloc(grid1sizemax*sizeof(double));
imask = (int*) malloc(grid1sizemax*sizeof(int));
gridsize = gridInqSize(gridID2);
array2 = malloc(gridsize*sizeof(double));
array2 = (double*) malloc(gridsize*sizeof(double));
if ( ! lwrite_remap )
{
......
......@@ -127,9 +127,9 @@ void *Replace(void *argument)
if ( nchvars )
{
vardata2 = malloc(nchvars*sizeof(double *));
varnmiss2 = malloc(nchvars*sizeof(int *));
varlevel = malloc(nchvars*sizeof(int *));
vardata2 = (double **) malloc(nchvars*sizeof(double *));
varnmiss2 = (int **) malloc(nchvars*sizeof(int *));
varlevel = (int **) malloc(nchvars*sizeof(int *));
for ( idx = 0; idx < nchvars; idx++ )
{
varID1 = varlist1[idx];
......@@ -137,17 +137,17 @@ void *Replace(void *argument)
nlevel1 = zaxisInqSize(vlistInqVarZaxis(vlistID1, varID1));
nlevel2 = zaxisInqSize(vlistInqVarZaxis(vlistID2, varID2));
gridsize = gridInqSize(vlistInqVarGrid(vlistID2, varID2));
vardata2[idx] = malloc(nlevel2*gridsize*sizeof(double));
varnmiss2[idx] = malloc(nlevel2*sizeof(int));
varlevel[idx] = malloc(nlevel1*sizeof(int));
vardata2[idx] = (double*) malloc(nlevel2*gridsize*sizeof(double));
varnmiss2[idx] = (int*) malloc(nlevel2*sizeof(int));
varlevel[idx] = (int*) malloc(nlevel1*sizeof(int));
/*
for ( levelID = 0; levelID < nlevel1; levelID++ )
varlevel[idx][levelID] = levelID;
*/
if ( nlevel2 <= nlevel1 )
{
double *level1 = malloc(nlevel1*sizeof(double));
double *level2 = malloc(nlevel2*sizeof(double));
double *level1 = (double*) malloc(nlevel1*sizeof(double));
double *level2 = (double*) malloc(nlevel2*sizeof(double));
zaxisInqLevels(vlistInqVarZaxis(vlistID1, varID1), level1);
zaxisInqLevels(vlistInqVarZaxis(vlistID2, varID2), level2);
......@@ -181,7 +181,7 @@ void *Replace(void *argument)
streamDefVlist(streamID3, vlistID3);
gridsize = vlistGridsizeMax(vlistID1);
array = malloc(gridsize*sizeof(double));
array = (double*) malloc(gridsize*sizeof(double));
nts2 = vlistNtsteps(vlistID2);
......
......@@ -112,7 +112,7 @@ void *Replacevalues(void *argument)
gridsize = vlistGridsizeMax(vlistID1);
array = malloc(gridsize*sizeof(double));
array = (double*) malloc(gridsize*sizeof(double));
tsID = 0;
while ( (nrecs = streamInqTimestep(streamID1, tsID)) )
......
......@@ -246,7 +246,7 @@ void *Rhopot(void *argument)
if ( nlevel1 != nlevel2 ) cdoAbort("temperature and salinity have different number of levels!");
nlevel = nlevel1;
pressure = malloc(nlevel*sizeof(double));
pressure = (double*) malloc(nlevel*sizeof(double));
zaxisInqLevels(zaxisID, pressure);
if ( pin >= 0 )
......@@ -264,9 +264,9 @@ void *Rhopot(void *argument)
field_init(&to);
field_init(&sao);
field_init(&rho);
to.ptr = malloc(gridsize*nlevel*sizeof(double));
sao.ptr = malloc(gridsize*nlevel*sizeof(double));
rho.ptr = malloc(gridsize*nlevel*sizeof(double));
to.ptr = (double*) malloc(gridsize*nlevel*sizeof(double));
sao.ptr = (double*) malloc(gridsize*nlevel*sizeof(double));
rho.ptr = (double*) malloc(gridsize*nlevel*sizeof(double));
to.nmiss = 0;
sao.nmiss = 0;
......
......@@ -46,8 +46,8 @@ void rot_uv_back(int gridID, double *us, double *vs)
ypole = gridInqYpole(gridID);
angle = gridInqAngle(gridID);
xvals = malloc(nlon*sizeof(double));
yvals = malloc(nlat*sizeof(double));
xvals = (double*) malloc(nlon*sizeof(double));
yvals = (double*) malloc(nlat*sizeof(double));
gridInqXvals(gridID, xvals);
gridInqYvals(gridID, yvals);
......@@ -137,11 +137,11 @@ void *Rotuv(void *argument)
nvars = vlistNvars(vlistID1);
nrecs = vlistNrecs(vlistID1);
recVarID = malloc(nrecs*sizeof(int));
recLevelID = malloc(nrecs*sizeof(int));
recVarID = (int*) malloc(nrecs*sizeof(int));
recLevelID = (int*) malloc(nrecs*sizeof(int));
varnmiss = malloc(nvars*sizeof(int *));
vardata = malloc(nvars*sizeof(double *));
varnmiss = (int **) malloc(nvars*sizeof(int *));
vardata = (double **) malloc(nvars*sizeof(double *));
for ( i = 0; i < nch; i++ ) lfound[i] = FALSE;
......@@ -176,8 +176,8 @@ void *Rotuv(void *argument)
gridsize = gridInqSize(gridID);
nlevel = zaxisInqSize(vlistInqVarZaxis(vlistID1, varID));
varnmiss[varID] = malloc(nlevel*sizeof(int));
vardata[varID] = malloc(gridsize*nlevel*sizeof(double));
varnmiss[varID] = (int*) malloc(nlevel*sizeof(int));
vardata[varID] = (double*) malloc(gridsize*nlevel*sizeof(double));
}
taxisID1 = vlistInqTaxis(vlistID1);
......
......@@ -82,12 +82,12 @@ void *Runpctl(void *argument)
nvars = vlistNvars(vlistID1);
nrecords = vlistNrecs(vlistID1);
recVarID = malloc(nrecords*sizeof(int));
recLevelID = malloc(nrecords*sizeof(int));
recVarID = (int*) malloc(nrecords*sizeof(int));
recLevelID = (int*) malloc(nrecords*sizeof(int));
dtinfo = malloc((ndates+1)*sizeof(dtinfo_t));
vars1 = malloc((ndates+1)*sizeof(field_t **));
array = malloc(ndates*sizeof(double));
dtinfo = (dtinfo_t*) malloc((ndates+1)*sizeof(dtinfo_t));
vars1 = (field_t ***) malloc((ndates+1)*sizeof(field_t **));
array = (double*) malloc(ndates*sizeof(double));
for ( its = 0; its < ndates; its++ )
{
......
......@@ -227,15 +227,15 @@ void *Runstat(void *argument)
nvars = vlistNvars(vlistID1);
nrecords = vlistNrecs(vlistID1);
recVarID = malloc(nrecords*sizeof(int));
recLevelID = malloc(nrecords*sizeof(int));
recVarID = (int*) malloc(nrecords*sizeof(int));
recLevelID = (int*) malloc(nrecords*sizeof(int));
dtinfo = malloc((ndates+1)*sizeof(dtinfo_t));
vars1 = malloc((ndates+1)*sizeof(field_t **));
dtinfo = (dtinfo_t*) malloc((ndates+1)*sizeof(dtinfo_t));
vars1 = (field_t ***) malloc((ndates+1)*sizeof(field_t **));
if ( !runstat_nomiss )
samp1 = malloc((ndates+1)*sizeof(field_t **));
samp1 = (field_t ***) malloc((ndates+1)*sizeof(field_t **));
if ( lvarstd )
vars2 = malloc((ndates+1)*sizeof(field_t **));
vars2 = (field_t ***) malloc((ndates+1)*sizeof(field_t **));
for ( its = 0; its < ndates; its++ )
{
......@@ -247,7 +247,7 @@ void *Runstat(void *argument)
}
gridsizemax = vlistGridsizeMax(vlistID1);
imask = malloc(gridsizemax*sizeof(int));
imask = (int*) malloc(gridsizemax*sizeof(int));
for ( tsID = 0; tsID < ndates; tsID++ )
{
......
......@@ -41,11 +41,11 @@ void genGrids(int gridID1, int *gridIDs, int nxvals, int nyvals, int nxblocks, i
nx = gridInqXsize(gridID1);
ny = gridInqYsize(gridID1);
xvals = malloc(nx*sizeof(double));
yvals = malloc(ny*sizeof(double));
xvals = (double*) malloc(nx*sizeof(double));
yvals = (double*) malloc(ny*sizeof(double));
xlsize = malloc(nxblocks*sizeof(int));
ylsize = malloc(nyblocks*sizeof(int));
xlsize = (int*) malloc(nxblocks*sizeof(int));
ylsize = (int*) malloc(nyblocks*sizeof(int));
gridInqXvals(gridID1, xvals);
gridInqYvals(gridID1, yvals);
......@@ -65,7 +65,7 @@ void genGrids(int gridID1, int *gridIDs, int nxvals, int nyvals, int nxblocks, i
offset = iy*nyvals*nx + ix*nxvals;
gridsize2 = xlsize[ix]*ylsize[iy];
gridindex[index] = malloc(gridsize2*sizeof(int));
gridindex[index] = (int*) malloc(gridsize2*sizeof(int));
gridsize2 = 0;
// printf("iy %d, ix %d offset %d\n", iy, ix, offset);
......@@ -207,19 +207,19 @@ void *Scatter(void *argument)
nsplit = nxblocks*nyblocks;
if ( nsplit > MAX_BLOCKS ) cdoAbort("Too many blocks (max = %d)!", MAX_BLOCKS);
array1 = malloc(gridsize*sizeof(double));
array1 = (double*) malloc(gridsize*sizeof(double));
vlistIDs = malloc(nsplit*sizeof(int));
streamIDs = malloc(nsplit*sizeof(int));
vlistIDs = (int*) malloc(nsplit*sizeof(int));
streamIDs = (int*) malloc(nsplit*sizeof(int));
grids = malloc(ngrids*sizeof(sgrid_t));
grids = (sgrid_t*) malloc(ngrids*sizeof(sgrid_t));
for ( i = 0; i < ngrids; i++ )
{
gridID1 = vlistGrid(vlistID1, i);
grids[i].gridID = vlistGrid(vlistID1, i);
grids[i].gridIDs = malloc(nsplit*sizeof(int));
grids[i].gridsize = malloc(nsplit*sizeof(int));
grids[i].gridindex = malloc(nsplit*sizeof(int*));
grids[i].gridIDs = (int*) malloc(nsplit*sizeof(int));
grids[i].gridsize = (int*) malloc(nsplit*sizeof(int));
grids[i].gridindex = (int**) malloc(nsplit*sizeof(int*));
for ( index = 0; index < nsplit; index++ ) grids[i].gridindex[index] = NULL;
}
......@@ -246,7 +246,7 @@ void *Scatter(void *argument)
for ( index = 0; index < nsplit; index++ )
if ( grids[0].gridsize[index] > gridsize2max ) gridsize2max = grids[0].gridsize[index];
array2 = malloc(gridsize2max*sizeof(double));
array2 = (double*) malloc(gridsize2max*sizeof(double));
strcpy(filename, cdoStreamName(1)->args);
nchars = strlen(filename);
......
......@@ -71,14 +71,14 @@ void *Seascount(void *argument)
nrecords = vlistNrecs(vlistID1);
recVarID = malloc(nrecords*sizeof(int));
recLevelID = malloc(nrecords*sizeof(int));
recVarID = (int*) malloc(nrecords*sizeof(int));
recLevelID = (int*) malloc(nrecords*sizeof(int));
gridsize = vlistGridsizeMax(vlistID1);
if ( vlistNumber(vlistID1) != CDI_REAL ) gridsize *= 2;
field_init(&field);
field.ptr = malloc(gridsize*sizeof(double));
field.ptr = (double*) malloc(gridsize*sizeof(double));
vars1 = field_malloc(vlistID1, FIELD_PTR);
......
......@@ -95,14 +95,14 @@ void *Seaspctl(void *argument)
nvars = vlistNvars(vlistID1);
nrecords = vlistNrecs(vlistID1);
recVarID = malloc(nrecords * sizeof(int));
recLevelID = malloc(nrecords * sizeof(int));
recVarID = (int*) malloc(nrecords * sizeof(int));
recLevelID = (int*) malloc(nrecords * sizeof(int));
gridsize = vlistGridsizeMax(vlistID1);
field.ptr = malloc(gridsize*sizeof(double));
field.ptr = (double*) malloc(gridsize*sizeof(double));
vars1 = malloc(nvars * sizeof(field_t *));
vars1 = (field_t **) malloc(nvars * sizeof(field_t *));
hset = hsetCreate(nvars);
for ( varID = 0; varID < nvars; varID++ )
......@@ -112,7 +112,7 @@ void *Seaspctl(void *argument)
nlevels = zaxisInqSize(vlistInqVarZaxis(vlistID1, varID));
missval = vlistInqVarMissval(vlistID1, varID);
vars1[varID] = malloc(nlevels * sizeof(field_t));
vars1[varID] = (field_t*) malloc(nlevels * sizeof(field_t));
hsetCreateVarLevels(hset, varID, nlevels, gridID);
for ( levelID = 0; levelID < nlevels; levelID++ )
......@@ -120,7 +120,7 @@ void *Seaspctl(void *argument)
vars1[varID][levelID].grid = gridID;
vars1[varID][levelID].nmiss = 0;
vars1[varID][levelID].missval = missval;
vars1[varID][levelID].ptr = malloc(gridsize * sizeof(double));
vars1[varID][levelID].ptr = (double*) malloc(gridsize * sizeof(double));
}
}
......
......@@ -94,13 +94,13 @@ void *Seasstat(void *argument)
nvars = vlistNvars(vlistID1);
nrecords = vlistNrecs(vlistID1);
recVarID = malloc(nrecords*sizeof(int));
recLevelID = malloc(nrecords*sizeof(int));
recVarID = (int*) malloc(nrecords*sizeof(int));
recLevelID = (int*) malloc(nrecords*sizeof(int));
gridsize = vlistGridsizeMax(vlistID1);
field_init(&field);
field.ptr = malloc(gridsize*sizeof(double));
field.ptr = (double*) malloc(gridsize*sizeof(double));
vars1 = field_malloc(vlistID1, FIELD_PTR);
samp1 = field_malloc(vlistID1, FIELD_NONE);
......@@ -178,7 +178,7 @@ void *Seasstat(void *argument)
if ( nmiss > 0 || samp1[varID][levelID].ptr )
{
if ( samp1[varID][levelID].ptr == NULL )
samp1[varID][levelID].ptr = malloc(gridsize*sizeof(double));
samp1[varID][levelID].ptr = (double*) malloc(gridsize*sizeof(double));
for ( i = 0; i < gridsize; i++ )
if ( DBL_IS_EQUAL(vars1[varID][levelID].ptr[i],
......@@ -198,7 +198,7 @@ void *Seasstat(void *argument)
{
if ( samp1[varID][levelID].ptr == NULL )
{
samp1[varID][levelID].ptr = malloc(gridsize*sizeof(double));
samp1[varID][levelID].ptr = (double*) malloc(gridsize*sizeof(double));
for ( i = 0; i < gridsize; i++ )
samp1[varID][levelID].ptr[i] = nsets;
}
......
......@@ -130,7 +130,7 @@ pml_t *pmlNew(const char *name)
{
pml_t *pml;
pml = malloc(sizeof(pml_t));
pml = (pml_t*) malloc(sizeof(pml_t));
pml_init(pml, name);
......@@ -196,7 +196,7 @@ int pmlAdd(pml_t *pml, const char *name, int type, int dis, void *ptr, size_t si
return (-1);
}
pml_entry = malloc(sizeof(pml_entry_t));
pml_entry = (pml_entry_t*) malloc(sizeof(pml_entry_t));
pml_entry->name = strdup(name);
pml_entry->len = strlen(name);
......@@ -328,7 +328,7 @@ int pmlRead(pml_t *pml, int argc, char **argv)
bufsize += len+1;
}
parbuf = malloc(bufsize*sizeof(char));
parbuf = (char*) malloc(bufsize*sizeof(char));
memset(parbuf, 0, bufsize*sizeof(char));
istart = 0;
......@@ -593,7 +593,7 @@ void *Select(void *argument)
vlistClearFlag(vlistID1);
nvars = vlistNvars(vlistID1);
vars = malloc(nvars*sizeof(int));
vars = (int*) malloc(nvars*sizeof(int));
if ( operatorID == DELETE )
{
......@@ -793,7 +793,7 @@ void *Select(void *argument)
{
gridsize = vlistGridsizeMax(vlistID1);
if ( vlistNumber(vlistID1) != CDI_REAL ) gridsize *= 2;
array = malloc(gridsize*sizeof(double));
array = (double*) malloc(gridsize*sizeof(double));
}
}
else
......
......@@ -107,7 +107,7 @@ void *Seloperator(void *argument)
if ( ! lcopy )
{
gridsize = vlistGridsizeMax(vlistID1);
array = malloc(gridsize*sizeof(double));
array = (double*) malloc(gridsize*sizeof(double));
}
tsID = 0;
......
......@@ -301,7 +301,7 @@ void *Seltime(void *argument)
if ( nsel )
{
selfound = malloc(nsel*sizeof(int));
selfound = (int*) malloc(nsel*sizeof(int));
for ( i = 0; i < nsel; i++ ) selfound[i] = FALSE;
}
......@@ -330,7 +330,7 @@ void *Seltime(void *argument)
{
gridsize = vlistGridsizeMax(vlistID1);
if ( vlistNumber(vlistID1) != CDI_REAL ) gridsize *= 2;
array = malloc(gridsize*sizeof(double));
array = (double*) malloc(gridsize*sizeof(double));
}
nvars = vlistNvars(vlistID1);
......@@ -344,15 +344,15 @@ void *Seltime(void *argument)
{
if ( lnts1 )
{
vdate_list = malloc(nts1*sizeof(int));
vtime_list = malloc(nts1*sizeof(int));
vdate_list = (int*) malloc(nts1*sizeof(int));
vtime_list = (int*) malloc(nts1*sizeof(int));
}
else
{
nts1 = 1;
}