]> git.gag.com Git - fw/sdcc/commitdiff
Fixed some warnings when building in MSVC
authorjesusc <jesusc@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 4 Aug 2003 17:00:36 +0000 (17:00 +0000)
committerjesusc <jesusc@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 4 Aug 2003 17:00:36 +0000 (17:00 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2806 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
src/ds390/gen.c
src/mcs51/gen.c
support/cpp2/cpplib.c

index ade051246ab37de93cc47d5c47f0f8562ffd9eda..1e70b3be73c0691ee5e2567edf9490e905a5b8a8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+2003-08-04  Jesus Calvino-Fraga <jesusc@ece.ubc.ca>
+
+       Fixed some warnings when building with MSVC:
+
+       * as\mcs51\asdata.c
+       * as\z80\asdata.c
+       * as\mcs51\asm.h
+       * as\z80\asm.h
+       * link\z80\aslink.h
+       * link\z80\lkdata.c
+       * link\z80\lkeval.c
+       * link\z80\lkgb.c
+       * link\z80\lkihx.c
+       * link\z80\lks19.c
+       * link\z80\lksym.c
+       * support\cpp2\cpplib.c
+       * src\ds390\gen.c
+       * src\mcs51\gen.c
+    
 2003-08-03  Bernhard Held <bernhard@bernhardheld.de>
 
        * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth@isi.edu>
index a718ba178ffd7c226e0cdd8266d8a428c19e5c4e..1686e093e38fa7383285b84f672376671b5ff31a 100644 (file)
@@ -4000,7 +4000,7 @@ genPlus (iCode * ic)
   if ( AOP_IS_STR(IC_LEFT(ic)) &&
       isOperandLiteral(IC_RIGHT(ic)) && OP_SYMBOL(IC_RESULT(ic))->ruonly) {
       aopOp (IC_RIGHT (ic), ic, TRUE, FALSE);
-      size = floatFromVal (AOP (IC_RIGHT(ic))->aopu.aop_lit);
+      size = (int)floatFromVal (AOP (IC_RIGHT(ic))->aopu.aop_lit);
       if (size <= 9) {
          while (size--) emitcode ("inc","dptr");
       } else {
@@ -4586,7 +4586,7 @@ genMultOneByte (operand * left,
 
   /* if literal */
   if (AOP_TYPE(right)==AOP_LIT) {
-    signed char val=floatFromVal (AOP (right)->aopu.aop_lit);
+    signed char val=(signed char)floatFromVal (AOP (right)->aopu.aop_lit);
     /* AND literal negative */
     if ((int) val < 0) {
       emitcode ("cpl", "F0"); // complement sign flag
@@ -4667,7 +4667,7 @@ static void genMultTwoByte (operand *left, operand *right,
        if (!umult) {
                emitcode("clr","F0");
                if (AOP_TYPE(right) == AOP_LIT) {
-                       int val=floatFromVal (AOP (right)->aopu.aop_lit);
+                       int val=(int)floatFromVal (AOP (right)->aopu.aop_lit);
                        if (val < 0) {
                                emitcode("setb","F0");
                                val = -val;
@@ -5010,7 +5010,7 @@ static void genDivTwoByte (operand *left, operand *right,
        /* load up MB with right */
        if (!umult) {
                if (AOP_TYPE(right) == AOP_LIT) {
-                       int val=floatFromVal (AOP (right)->aopu.aop_lit);
+                       int val=(int)floatFromVal (AOP (right)->aopu.aop_lit);
                        if (val < 0) {
                                lbl = newiTempLabel(NULL);
                                emitcode ("jbc","F0,!tlabel",lbl->key+100);
@@ -5267,7 +5267,7 @@ static void genModTwoByte (operand *left, operand *right,
        /* load up MB with right */
        if (!umult) {
                if (AOP_TYPE(right) == AOP_LIT) {
-                       int val=floatFromVal (AOP (right)->aopu.aop_lit);
+                       int val=(int)floatFromVal (AOP (right)->aopu.aop_lit);
                        if (val < 0) {
                                val = -val;
                        } 
index 42914f8d0c936746b3ba20d7651affcfbe345f15..6825ec2eda447731b3ecc62beeaa6e979f385901 100644 (file)
@@ -3579,7 +3579,7 @@ genMultOneByte (operand * left,
 
   /* if literal */
   if (AOP_TYPE(right)==AOP_LIT) {
-    signed char val=floatFromVal (AOP (right)->aopu.aop_lit);
+    signed char val=(signed char)floatFromVal (AOP (right)->aopu.aop_lit);
     /* AND literal negative */
     if (val < 0) {
       emitcode ("cpl", "F0"); // complement sign flag
index f0bc9cec6e1f886a4b8dd23ff14b313d37fbf81f..c93d670e92db704a2829ddb7a28553be51c50f1b 100644 (file)
@@ -1135,7 +1135,7 @@ do_pragma_sdcc_hash (pfile)
      cpp_reader *pfile;
 {
     cpp_token tok;
-    cpp_hashnode *hp;
+    /*cpp_hashnode *hp;*/
 
     _cpp_lex_token (pfile, &tok);
     if (tok.type == CPP_PLUS)