Abraxas/Misra Home  Table of Contents

Module - m126.html

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

Misra-C Test Suite for Module - m126.c

/* Misra C Enforcement Testing */

Misra C Enforcement Testing */

/* Rule 126: Required */

Rule 126: Required */

/* The library functions abort, exit, getenv and system from */

The library functions abort, exit, getenv and system from */

/* shall not be used. */

shall not be used. */
/*   */
#include 
#include "misra.h"
static void
func126 ( void ) 



Function Name: func126()

{
    
int i;
char *pc;
    
    i = system ( "ls" ) ; /*  RULE 126  */
    pc = getenv ( "ENVAL" ) ; /*  RULE 126  */
    
    if ( i == 1 ) 
    {
        
        abort (  ) ; /*  RULE 126  */
        
    }
    else
    {
        
        exit ( EXIT_SUCCESS ) ; /*  RULE 126  */
        
    }
    
}

Abraxas/Misra Home  Table of Contents

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