/* >>>------------------------------------------------------------ * * File: rule_16.6.c, Module: M2CM-3.2-QAC-8.1.2 * * RULE 16.6 (Required): * The number of arguments passed to a function shall match the * number of parameters. * * Implemented by messages: * 422 [C] Function call contains fewer arguments than * prototype specifies. * * 423 [C] Function call contains more arguments than prototype * specifies. * * 3319 [U] Function called with number of arguments which * differs from number of parameters in definition. * * <<<------------------------------------------------------------ */ /* PRQA S 3206 ++ */ #include "misra.h" #include "m2cmex.h" static S16 test_1606a( S16 i, S16 j ); static S16 test_1606b( S16 k ); static S16 test_1606c(); static S16 test_1606c( a ) S16 a; { return a; } extern S16 test_1606( void ) { S16 r; r = test_1606a( 1 ); /* MISRA Violation */ r += test_1606b( 1, 1 ); /* MISRA Violation */ r += test_1606c( 1, 1 ); /* MISRA Violation */ return r; } static S16 test_1606a( S16 i, S16 j ) { return i + j; } static S16 test_1606b( S16 k ) { return k; }