From: Oliver Schmidt
Date: Sun, 7 Apr 2013 20:17:24 +0000 (+0200)
Subject: Allow for warning-free build of ca65 with MS VC on warning level 3.
X-Git-Tag: V2.14~74
X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=365668785c789d04493753023d82416813fcf9e2;p=cc65
Allow for warning-free build of ca65 with MS VC on warning level 3.
---
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));