Abraxas/Misra Home  Table of Contents

Module - m43.html

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

Misra-C Test Suite for Module - m43.c

/* Misra C Enforcement Testing */

Misra C Enforcement Testing */

/* Rule 43: Required */

Rule 43: Required */

/* Implicit conversions which may result in a loss of information */

Implicit conversions which may result in a loss of information */

/* shall not be used. */

shall not be used. */
#include "misra.h"
SI_32
rule43 ( void ) 



Function Name: rule43()

{
    
SI_16 a = 3;
SI_32 i = 3;
SI_32 j = 3;
SI_32 c = 3;
    
    a = ( i + j ) * ( i + j ) ; /*  RULE 43  */
    j = ( i * i * ( a = i ) * ( i + j )  ) ; /*  RULE 43  */
    a = ( i + j ) * (  ( SI_16 ) ( i + j )  ) ; /*  RULE 43  */
    
    a = ( SI_16 ) (  ( i + j ) * ( i + j )  ) ; 
    
    j = ( i + j ) * ( i + j ) ; 
    
    c = j;
    
    return c;
    
}

Abraxas/Misra Home  Table of Contents

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