I'm getting this warning on line #9. It's almost like the char type is by default unsigned in the compiler. I believe this may be the case with the IAR compiler, but the cl430 compiler manual states that the char type is by default signed for this EABI data type. When I change the variable in line #5 to be a signed char the warning is removed. ?
Ref:-------------------------------------
Line # Code
1 void TestCharDefaultType(void)
2 {
3 unsigned char smoc1;
4 unsigned char smoc2;
5 char result;
6 smoc1=10;
7 smoc2=3;
8 result=(char)smoc2 - (char)smoc1;
9 if (result < 0)
10 smoc1=2;
11 }