Skip to content
Snippets Groups Projects
Commit 9d13437e authored by Thomas Jahns's avatar Thomas Jahns :cartwheel:
Browse files

Fix implicit conversions in cdiCreateTimesteps.

parent 3eb99160
No related branches found
No related tags found
No related merge requests found
......@@ -62,8 +62,8 @@ int tstepsNewEntry(stream_t *streamptr)
void cdiCreateTimesteps(stream_t *streamptr)
{
int ntsteps;
int tsID;
long ntsteps;
long tsID;
if ( streamptr->ntsteps < 0 || streamptr->tstepsTableSize > 0 )
return;
......@@ -71,16 +71,16 @@ void cdiCreateTimesteps(stream_t *streamptr)
if ( streamptr->ntsteps == 0 ) ntsteps = 1; /* <<<<<-------- */
else ntsteps = streamptr->ntsteps;
streamptr->tsteps = (tsteps_t *) malloc(ntsteps*sizeof(tsteps_t));
streamptr->tsteps = (tsteps_t *) malloc((size_t)ntsteps*sizeof(tsteps_t));
if ( streamptr->tsteps == NULL )
SysError("Allocation of tsteps_t failed");
streamptr->tstepsTableSize = ntsteps;
streamptr->tstepsNextID = ntsteps;
streamptr->tstepsTableSize = (int)ntsteps;
streamptr->tstepsNextID = (int)ntsteps;
for ( tsID = 0; tsID < ntsteps; tsID++ )
{
tstepsInitEntry(streamptr, tsID);
tstepsInitEntry(streamptr, (int)tsID);
streamptr->tsteps[tsID].taxis.used = TRUE;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment