/* >>>------------------------------------------------------------ * * File: rule_19.8.c, Module: M2CM-3.2-QAC-8.1.2 * * RULE 19.8 (Required): * A function-like macro shall not be invoked without all of its * arguments. * * Implemented by messages: * 850 [C99] Macro argument is empty. * * 856 [C] Fewer arguments in macro call than specified in * definition. * * <<<------------------------------------------------------------ */ #include "misra.h" #include "m2cmex.h" #define MAX( A, B ) ( ( ( A ) > ( B ) ) ? ( A ) : ( B ) ) #define INC( X ) ( X + 1 ) extern S16 test_1908( void ) { S16 s16k; S16 s16m; s16k = MAX( s16a, 1 ); s16k = s16k + MAX( s16a ); /* MISRA Violation */ s16m = INC(); /* MISRA Violation */ return s16k + s16m; }