Abraxas/Misra Home  Table of Contents

Module - m21.html

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

Misra-C Test Suite for Module - m21.c

/* Misra C Enforcement Testing */

Misra C Enforcement Testing */

/* Rule 21: Required */

Rule 21: Required */

/* Identifiers in an inner scope shall not mask identifiers in an */

Identifiers in an inner scope shall not mask identifiers in an */

/* outer scope. */

outer scope. */
#include "misra.h"
static SI_32 i;
static SI_32 func21 ( SI_32 j ) ;
static SI_32
func21 ( SI_32 j ) 



Function Name: func21()

{
    
SI_32 i = 1; /*  RULE 21  */
    
    if ( j > 3 ) 
    {
        
SI_32 j = 4; /*  RULE 21  */
        
        i = j;
        
    }
    
    return i;
    
}
static SI_32
func21a ( SI_32 j ) 



Function Name: func21a()

{
    
    return i;
    
}

Abraxas/Misra Home  Table of Contents

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