Abraxas/Misra Home  Table of Contents

Module - m63.html

ABRAXAS SOFTWARE - CodeCheck MISRA Test-Suite Misra-C:1998 Misra-C:2004.

Misra-C Test Suite for Module - m63.c

/* Misra C Enforcement Testing */

Misra C Enforcement Testing */

/* Rule 63: Advisory */

Rule 63: Advisory */

/* A switch expression should not represent a Boolean value. */

A switch expression should not represent a Boolean value. */
#include "misra.h"
SI_32
rule63 ( void ) 



Function Name: rule63()

{
    
SI_32 c = 3;
SI_32 i = 3;
    
    switch ( i == 3 ) /*  RULE 63  [ very similiar to rule 53 ] */
    {
        
        case 3:
        case 4: c = 4; break;
        default: break;
        
    }
    
    switch ( i ) 
    {
        
        case 3:
        case 4: c = 4; break;
        default: break;
        
    }
    
    return c;
    
}

Abraxas/Misra Home  Table of Contents

ABRAXAS SOFTWARE - CodeCheck MISRA Test-Suite Misra-C:1998 Misra-C:2004.