uint8 config;
#define ELEM1 1U
void test1(void)
{
/*Check Bit 0 of Configuration*/
if((config) == 2 && (config) == 4)
{
arr[ELEM1].status[0] = 0x00;
}
}
我需要试试吗
1)
if(((config) == 2) && ((config) == 4))
if((Boolean)((config) == 2) && ((config) == 4))
经过上述更改后,我现在观察到错误:
条件表达式应该具有本质上的布尔类型 [MISRA 2012 规则 14.4,必需]