Skip to content

Commit aca9b69

Browse files
committed
warnings: 32bit: format and overflow
Fix some types to avoid warnings on 32bit systems due to the size of LONG.
1 parent dfaa19b commit aca9b69

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

sources/pre.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ UBYTE *GetPreVar(UBYTE *name, int flag)
568568
else if ( ( StrICmp(name,(UBYTE *)"timer_") == 0 )
569569
|| ( StrICmp(name,(UBYTE *)"stopwatch_") == 0 ) ) {
570570
static char timestring[40];
571-
snprintf(timestring,40,"%ld",(GetRunningTime() - AP.StopWatchZero));
571+
snprintf(timestring,40,"%ld",(long int)(GetRunningTime() - AP.StopWatchZero));
572572
return((UBYTE *)timestring);
573573
}
574574
else if ( StrICmp(name, (UBYTE *)"numactiveexprs_") == 0 ) {

sources/sch.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ void RatToLine(UWORD *a, WORD na)
338338
{
339339
GETIDENTITY
340340
WORD adenom, anumer;
341-
UWORD maxInt;
341+
ULONG maxInt;
342342

343343
if ( AC.OutputMode == CMODE ) {
344344
// In C, integer literals over 2^32-1 are automatically promoted to longer types up to

0 commit comments

Comments
 (0)