From 2fc4945671c819e3a9c8d12f42e04b62e796e03f Mon Sep 17 00:00:00 2001 From: jtvolpe Date: Sun, 20 May 2001 03:19:45 +0000 Subject: [PATCH] Fixed up implicit data type conversions git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@829 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- src/SDCCglue.c | 6 +++--- support/cpp/cpplib.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/SDCCglue.c b/src/SDCCglue.c index 733c0e6a..b95d90db 100644 --- a/src/SDCCglue.c +++ b/src/SDCCglue.c @@ -48,7 +48,7 @@ set *publics = NULL; /* public variables */ set *externs = NULL; /* Varibles that are declared as extern */ /* TODO: this should be configurable (DS803C90 uses more than 6) */ -int maxInterrupts = 6; +unsigned maxInterrupts = 6; int allocInfo = 1; symbol *mainf; extern char *VersionString; @@ -112,7 +112,7 @@ aopLiteralLong (value * val, int offset, int size) /* if it is a float then it gets tricky */ /* otherwise it is fairly simple */ if (!IS_FLOAT (val->type)) { - unsigned long v = floatFromVal (val); + unsigned long v = (unsigned long) floatFromVal (val); v >>= (offset * 8); switch (size) { @@ -1060,7 +1060,7 @@ flushStatics (void) void createInterruptVect (FILE * vFile) { - int i = 0; + unsigned i = 0; mainf = newSymbol ("main", 0); mainf->block = 0; diff --git a/support/cpp/cpplib.h b/support/cpp/cpplib.h index dd5f7a01..e14d6834 100644 --- a/support/cpp/cpplib.h +++ b/support/cpp/cpplib.h @@ -274,7 +274,7 @@ struct cpp_reader { /* Make sure PFILE->token_buffer has space for at least N more characters. */ #define CPP_RESERVE(PFILE, N) \ - (CPP_WRITTEN (PFILE) + N > (PFILE)->token_buffer_size \ + ((int) (CPP_WRITTEN (PFILE) + N) > (PFILE)->token_buffer_size \ && (cpp_grow_buffer (PFILE, N), 0)) /* Append string STR (of length N) to PFILE's output buffer. -- 2.39.5