EvenNumW = EVENUP(NumBytes);
+ assert(ID <= UINT32_MAX);
if( Write32ToFile( fid, (uint32_t)ID ) < 0 ) goto error;
+ assert(EvenNumW <= UINT32_MAX);
if( Write32ToFile( fid, (uint32_t)EvenNumW ) < 0 ) goto error;
numw = sdWriteFile( Data, 1, EvenNumW, fid );
NameSize = QUADUP(NameSize); /* Align */
if( NameSize > 0 )
{
- NameSize = MAX( NameSize, (NameChunkSize + 1024) );
+ NameSize = MAX( (ucell_t)NameSize, (NameChunkSize + 1024) );
}
SD.sd_NameSize = NameSize;
}
/* How much real code is there? */
CodeChunkSize = QUADUP(relativeCodePtr);
CodeSize = QUADUP(CodeSize); /* Align */
- CodeSize = MAX( CodeSize, (CodeChunkSize + 2048) );
+ CodeSize = MAX( (ucell_t)CodeSize, (CodeChunkSize + 2048) );
SD.sd_CodeSize = CodeSize;
/***************************************************************/
static int32_t Read32FromFile( FileStream *fid, uint32_t *ValPtr )
{
- int32_t numr;
+ cell_t numr;
uint8_t pad[4];
numr = sdReadFile( pad, 1, sizeof(pad), fid );
if( numr != sizeof(pad) ) return -1;
uint32_t ChunkSize;
uint32_t FormSize;
uint32_t BytesLeft;
- uint32_t numr;
+ cell_t numr;
int isDicBigEndian;
DBUG(("pfLoadDictionary( %s )\n", FileName ));
/* Find special words in dictionary for global XTs. */
if( (Result = FindSpecialXTs()) < 0 )
{
- pfReportError("pfLoadDictionary: FindSpecialXTs", Result);
+ pfReportError("pfLoadDictionary: FindSpecialXTs", (Err)Result);
goto error;
}
}