Abraxas/Misra Home  Table of Contents

Module - m45.html

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

Misra-C Test Suite for Module - m45.c

/* Misra C Enforcement Testing */

Misra C Enforcement Testing */

/* Rule 45: Required */

Rule 45: Required */

/* Type casting from any type to or from pointers shall not be used. */

Type casting from any type to or from pointers shall not be used. */
#include "misra.h"
SI_32
rule45 ( void ) 



Function Name: rule45()

{
    
SI_32 c = 3;
    
SI_32 *pc = &c;
SI_16 *pj;
    
    pj = ( SI_16 * ) c;		/*  RULE 45  */
    pc = ( SI_32 * ) pj;	/*  RULE 45  */
    c = ( SI_32 ) pc;		/*  RULE 45  */
    
    return c;
    
}

Abraxas/Misra Home  Table of Contents

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