Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 21.1: uint8 = ~uint8?
#1
Hello,

I use a tool, which tested code to MISRA-C:2004 compliance.

Here is a code example, on which our analyse tool says, there is a breach of rule 21.1.

Code:
...
...
int main(void)
{
...
...
    uint8_t STATE;
    uint8_t MASK;
...
...
    STATE = 0x01;
    MASK = 0x10;
...
...
    

    STATE = ~MASK;
        /* That line it is, which show up the breach of the rule*/

}

The Tool says, this breaches rule 21.1. But i think it's ok, or what do the MISRA comitee says?

thanks a lot
<t>best regards,<br/>
Manni</t>


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)