From: jesusc Date: Mon, 4 Aug 2003 17:00:36 +0000 (+0000) Subject: Fixed some warnings when building in MSVC X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=6d6039133e612284f032da8b1baaa1a5088b6765;p=fw%2Fsdcc Fixed some warnings when building in MSVC git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2806 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/ChangeLog b/ChangeLog index ade05124..1e70b3be 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,22 @@ +2003-08-04 Jesus Calvino-Fraga + + 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 * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth diff --git a/src/ds390/gen.c b/src/ds390/gen.c index a718ba17..1686e093 100644 --- a/src/ds390/gen.c +++ b/src/ds390/gen.c @@ -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; } diff --git a/src/mcs51/gen.c b/src/mcs51/gen.c index 42914f8d..6825ec2e 100644 --- a/src/mcs51/gen.c +++ b/src/mcs51/gen.c @@ -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 diff --git a/support/cpp2/cpplib.c b/support/cpp2/cpplib.c index f0bc9cec..c93d670e 100644 --- a/support/cpp2/cpplib.c +++ b/support/cpp2/cpplib.c @@ -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)