From 365668785c789d04493753023d82416813fcf9e2 Mon Sep 17 00:00:00 2001
From: Oliver Schmidt
Date: Sun, 7 Apr 2013 22:17:24 +0200
Subject: [PATCH] Allow for warning-free build of ca65 with MS VC on warning
level 3.
---
src/ca65/expr.c | 2 +-
src/ca65/pseudo.c | 2 +-
src/ca65/scanner.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/ca65/expr.c b/src/ca65/expr.c
index 6c68dd8d6..c642bc61d 100644
--- a/src/ca65/expr.c
+++ b/src/ca65/expr.c
@@ -1031,7 +1031,7 @@ static ExprNode* Factor (void)
break;
case TOK_TIME:
- N = GenLiteralExpr (time (0));
+ N = GenLiteralExpr ((long) time (0));
NextTok ();
break;
diff --git a/src/ca65/pseudo.c b/src/ca65/pseudo.c
index 3f67c2fe6..74dd4b260 100644
--- a/src/ca65/pseudo.c
+++ b/src/ca65/pseudo.c
@@ -1267,7 +1267,7 @@ static void DoIncBin (void)
}
/* Add the file to the input file table */
- AddFile (&Name, FT_BINARY, Size, StatBuf.st_mtime);
+ AddFile (&Name, FT_BINARY, Size, (unsigned long) StatBuf.st_mtime);
/* If a count was not given, calculate it now */
if (Count < 0) {
diff --git a/src/ca65/scanner.c b/src/ca65/scanner.c
index d36df2d06..f99876c33 100644
--- a/src/ca65/scanner.c
+++ b/src/ca65/scanner.c
@@ -526,7 +526,7 @@ int NewInputFile (const char* Name)
/* Add the file to the input file table and remember the index */
FileIdx = AddFile (SB_InitFromString (&NameBuf, Name),
(FCount == 0)? FT_MAIN : FT_INCLUDE,
- Buf.st_size, Buf.st_mtime);
+ Buf.st_size, (unsigned long) Buf.st_mtime);
/* Create a new input source variable and initialize it */
S = xmalloc (sizeof (*S));
--
2.39.5