/* >>>------------------------------------------------------------ * * File: rule_20.11.c, Module: M2CM-3.2-QAC-8.1.2 * * RULE 20.11 (Required): * The library functions abort, exit, getenv and system from * library shall not be used. * * Implemented by message: * 5126 The library functions abort, exit, getenv and system * from library shall not be used. * * <<<------------------------------------------------------------ */ /* PRQA S 2983,3203 ++ */ #include #include "misra.h" #include "m2cmex.h" extern S16 test_2011( void ) { S16 i; PC *v; i = system( "test" ); /* MISRA Violation */ if ( i < -99 ) { abort(); /* MISRA Violation */ } if ( i == 40 ) { exit( 1 ); /* MISRA Violation */ } v = getenv( "test" ); /* MISRA Violation */ return 0; /* MISRA Violation */ }