Abraxas/Misra Home  Table of Contents

Module - m104.html

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

Misra-C Test Suite for Module - m104.c

/* Misra C Enforcement Testing */

Misra C Enforcement Testing */

/* Rule 104: Required */

Rule 104: Required */

/* Non-constant pointers to functions shall not be used. */

Non-constant pointers to functions shall not be used. */
static
int func104a ( void ) 



Function Name: func104a()

{
    
    return 1;
    
}
static
int func104b ( void ) 



Function Name: func104b()

{
    
    return 1;
    
}
static int ( *fp )  ( void ) ;
void
func104 ( void ) 



Function Name: func104()

{
    
int k = 1;
    
    if ( k == 1 ) 
    {
        
        fp = func104a; 
        
    }
    else
    {
        
        fp = ( int ( * )  (  )  ) func104b; /*  RULE 104  */
        
    }
    
}

Abraxas/Misra Home  Table of Contents

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