Abraxas/Misra Home  Table of Contents

Module - m105.html

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

Misra-C Test Suite for Module - m105.c

/* Misra C Enforcement Testing */

Misra C Enforcement Testing */

/* Rule 105: Required */

Rule 105: Required */

/* All the functions pointed by a single pointer function shall be */

All the functions pointed by a single pointer function shall be */

/* identical in the number and type of parameters and the return type. */

identical in the number and type of parameters and the return type. */
static
int func105a ( void ) 



Function Name: func105a()

{
    
    return 1;
    
}
static
long func105b ( void ) 



Function Name: func105b()

{
    
    return 1;
    
}
static
int func105c ( int a ) 



Function Name: func105c()

{
    
    return a;
    
}
static int ( *fp )  ( void ) ;
static void
func105 ( void ) 



Function Name: func105()

{
    
int k = 1;
    
    if ( k == 1 ) 
    {
        
        fp = func105a; 
        
    }
    else if ( k == 2 ) 
    {
        
        fp = func105b; /*  RULE 105  */
        
    }
    else
    {
        
        fp = func105c; /*  RULE 105  */
        
    }
    
}

Abraxas/Misra Home  Table of Contents

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