06-09-2017, 07:50 AM
Dear MISRA team,
the following comparison of two values of the same type is marked as violation of 5-0-4:
Is this a false positive?
I fail to see implementation-defined behaviour.
BTW, the rule scope/text fails to reference the implementation-defined behaviour.
Thanks.
the following comparison of two values of the same type is marked as violation of 5-0-4:
Code:
typedef unsigned char ui8;
extern ui8 a;
extern ui8 b;
void test(void)
{
if (a != b)// false positive?
{
a = b;
}
}
Is this a false positive?
I fail to see implementation-defined behaviour.
BTW, the rule scope/text fails to reference the implementation-defined behaviour.
Thanks.
<t></t>