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