]> git.gag.com Git - fw/sdcc/commitdiff
Fixed up implicit data type conversions
authorjtvolpe <jtvolpe@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 20 May 2001 03:19:45 +0000 (03:19 +0000)
committerjtvolpe <jtvolpe@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 20 May 2001 03:19:45 +0000 (03:19 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@829 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/SDCCglue.c
support/cpp/cpplib.h

index 733c0e6a563fe88c3d701d0e143d18f14d61f1a8..b95d90dbc65cf2075b051442c634da0535b3a870 100644 (file)
@@ -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;
 
index dd5f7a013e128cd5c349dc8c8fc19fed6fc501cd..e14d68341ef13561ba8967aca14cbd510e52d628 100644 (file)
@@ -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.