Commit 4ec1c639 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Check split -weak

parent 3e99514d
......@@ -786,7 +786,7 @@ static void file_set_buffer(F_I_L_E *fileptr)
fileptr->bufferType = FILE_TYPE_STD;
if ( FileBufferSizeEnv >= 0 )
buffersize = FileBufferSizeEnv;
buffersize = (size_t) FileBufferSizeEnv;
else if ( fileptr->bufferSize > 0 )
buffersize = fileptr->bufferSize;
else
......@@ -796,11 +796,11 @@ static void file_set_buffer(F_I_L_E *fileptr)
}
if ( (size_t) fileptr->size < buffersize )
buffersize = fileptr->size;
buffersize = (size_t) fileptr->size;
if ( fileptr->bufferType == FILE_TYPE_MMAP )
{
size_t blocksize = pagesize();
size_t blocksize = (size_t) pagesize();
size_t minblocksize = 4 * blocksize;
buffersize = buffersize - buffersize % minblocksize;
......@@ -813,7 +813,7 @@ static void file_set_buffer(F_I_L_E *fileptr)
fileptr->bufferType = FILE_TYPE_STD;
if ( FileBufferSizeEnv >= 0 )
buffersize = FileBufferSizeEnv;
buffersize = (size_t) FileBufferSizeEnv;
else if ( fileptr->bufferSize > 0 )
buffersize = fileptr->bufferSize;
else
......@@ -1082,7 +1082,7 @@ int fileOpen(const char *filename, const char *mode)
{
fileptr->mode = fmode;
fileptr->name = strdupx(filename);
fileptr->blockSize = filestat.st_blksize;
fileptr->blockSize = (size_t) filestat.st_blksize;
if ( fmode == 'r' ) fileptr->size = filestat.st_size;
......
......@@ -268,7 +268,7 @@ int grbReadRecord(int streamID, double *data, int *nmiss)
fileSetPos(fileID, recpos, SEEK_SET);
fileRead(fileID, gribbuffer, recsize);
fileRead(fileID, gribbuffer, (size_t) recsize);
grbDecodeDataDP(gribbuffer, recsize, data, gridsize, streams[streamID].unreduced, nmiss);
......@@ -1142,7 +1142,7 @@ int grbScanTimestep2(int streamID)
if ( recsize > buffersize )
{
buffersize = recsize;
gribbuffer = (unsigned char *) realloc(gribbuffer, buffersize);
gribbuffer = (unsigned char *) realloc(gribbuffer, (size_t)buffersize);
}
readsize = recsize;
......@@ -1569,7 +1569,7 @@ void grbDefGrid(int *isec1, int *isec2, int gridID)
if ( gridtype == GRID_GENERIC )
{
size_t xsize, ysize;
int xsize, ysize;
xsize = gridInqXsize(gridID);
ysize = gridInqYsize(gridID);
......
......@@ -49,7 +49,7 @@ int CDI_Debug = 0; /* If set to 1, debugging */
char *strfiletype(int filetype)
{
char *name;
int size = sizeof(Filetypes)/sizeof(char *);
int size = (int) (sizeof(Filetypes)/sizeof(char *));
if ( filetype > 0 && filetype < size )
name = Filetypes[filetype];
......
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