compiler/libec: Fixed 2 more long warnings
authorJerome St-Louis <jerome@ecere.com>
Mon, 15 Apr 2013 11:16:38 +0000 (07:16 -0400)
committerJerome St-Louis <jerome@ecere.com>
Mon, 15 Apr 2013 11:16:38 +0000 (07:16 -0400)
compiler/libec/src/ast.ec
compiler/libec/src/pass15.ec

index 9b9048d..1d6a21e 100644 (file)
@@ -2502,7 +2502,7 @@ static Type ProcessTypeDecls(OldList specs, Declarator decl, Type parentType)
                ProcessExpressionType(exp);
                ComputeExpression(exp);
                if(exp.type == constantExp)
-                  type.bitFieldCount = strtoul(exp.constant, null, 0);
+                  type.bitFieldCount = (uint)strtoul(exp.constant, null, 0);
             }
             break;
          }
index 9d8e11d..af737e5 100644 (file)
@@ -4768,7 +4768,7 @@ void ComputeInstantiation(Expression exp)
                                     case intType:
                                     {
                                        void (*Set)(void *, int) = (void *)prop.Set;
-                                       Set(inst.data, strtol(value.constant, null, 0));
+                                       Set(inst.data, (int)strtol(value.constant, null, 0));
                                        break;
                                     }
                                     case int64Type: