Abraxas/Misra Home  Table of Contents

Module - m62.html

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

Misra-C Test Suite for Module - m62.c

/* Misra C Enforcement Testing */

Misra C Enforcement Testing */

/* Rule 62: Required */

Rule 62: Required */

/* All switch statements should contain a final default clause. */

All switch statements should contain a final default clause. */
#include "misra.h"
SI_32
rule62 ( void ) 



Function Name: rule62()

{
    
SI_32 c = 3;
SI_32 i = 3;
    
    switch ( i ) /*  RULE 62  */
    {
        
        case 3:
        case 4: c = 4; break;
        
    }
    
    switch ( i ) 
    {
        
        case 3:
        default: break; /*  RULE 62  */
        case 4: c = 4; 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.