Abraxas/Misra Home  Table of Contents

Module - m118.html

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

Misra-C Test Suite for Module - m118.c

/* Misra C Enforcement Testing */

Misra C Enforcement Testing */

/* Rule 118: Required */

Rule 118: Required */

/* Dynamic heap memory allocation shall not be used. */

Dynamic heap memory allocation shall not be used. */
#include 
#include "misra.h"
static void
func118 ( void ) 



Function Name: func118()

{
    
double *pd;
    
    pd = malloc ( sizeof ( double )  ) ; /*  RULE 118  */
    pd = calloc ( 1,sizeof ( double )  ) ; /*  RULE 118  */
    pd = realloc ( pd,2*sizeof ( double )  ) ; /*  RULE 118  */
    realloc ( pd,2*sizeof ( double )  ) ; /*  RULE 118  */

/* Doubly dangerous */

Doubly dangerous */

/* pd might move */

pd might move */
    
}

Abraxas/Misra Home  Table of Contents

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