I am using MISRA C 2004 standards in Code Composer Studio. I am always getting errors with respect to bitwise operations during initialization of the peripherals.
In the compiler .h file, the definition is like this.
#define SFR_8BIT(addr) extern volatile unsigned char addr
SFR_8BIT(REG1);
#define REG2 REG1
Now in my code, if I use
REG2 |= 0x01;
The MISRA C is popping out these errors:
Bitwise operators shall not be applied to operands whose underlying type is signed - #1393-D (MISRA-C:2004 10.1/R)
The value of an expression of integer type shall not be implicitly converted to a different underlying type if it is not a conversion to a integer type of the same signedness.
I don't want to change the compiler .h file, and I want to eradicate these warnings.