25-02-2015, 10:16 PM
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:
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
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>