Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Recommendations to resolve issue 12.4
#1
Hello,

I had a question regarding rule 12.4 and realize I asked a similar question here:

http://www.misra-c.com/forum/viewtopic.php?f=68&t=1296

I didn't want to bump an old thread so I started a new one (hopefully, that's ok).

I received an error for rule 12-4 with the following section of code:

Code:
if((CommandState!=7u)&&(CommandState!=8u)&&(CommandState!=9u)&&(CommandState!=10u)&&(CommandState!=11u)&&(commData==0x24u)) /* Please ignore the fact this is written inefficiently for now */
{
        CommandState = 0u;
}

I resolved this issue using the following section of code but I wasn't sure if this is the best way to handle the code or if it's recommended to handle it using a different technique:

[code]if(commData==0x24u)
{
if(CommandState>=7u)
{
if(CommandState
<t></t>
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)