Abraxas/Misra Home  Table of Contents

Module - m60.html

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

Misra-C Test Suite for Module - m60.c

/* Misra C Enforcement Testing */

Misra C Enforcement Testing */

/* Rule 60: Advisory */

Rule 60: Advisory */

/* All if, else if constructs should contain a final else clause. */

All if, else if constructs should contain a final else clause. */
#include "misra.h"
SI_32
rule60 ( void ) 



Function Name: rule60()

{
    
SI_32 c = 3;
SI_32 i = 3;
    
    if ( i == 3 ) /*  RULE 60  */
    {
        
        c = 3;
        
    }
    else if ( i == 3 ) 
    {
        
        c = 2;
        
    }
    
    if ( i == 3 ) 
    {
        
        c = 3;
        
    }
    else if ( i == 3 ) 
    {
        
        c = 2;
        
    }
    else
    {
        
        c = 1;
        
    }
    
    if ( i == 3 ) 
    {
        
        c = 3;
        
    }
    else
    {
        
        c = 1;
        
    }
    
    if ( i == 3 ) 
    {
        
        c = 3;
        
    }
    
    return c;
    
}

Abraxas/Misra Home  Table of Contents

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