Hi,
how is it possible to determine if a char value is smaller than 0x00?
char value=0xFE; if((char)value < (char)0x00) printf("< 0\n");
Working with uvision mdk-arm I get always a warn-message "pointless comparison of unsigned integer with zero"
best regards Hans-Peter
Whether plain char is a signed type or unsigned type is implementation-defined. For your implementation, it's apparently unsigned.
Avoid plain char as a small integer type and instead use 'signed char' or 'unsigned char'.
Or, better yet, use int8_t and uint8_t defined in stdint.h. For portability and performance, you can also use int_fast8_t and uint_fast8_t defined in the same header.