/* >>>------------------------------------------------------------ * * File: rule_8.3.c, Module: M2CM-3.2-QAC-8.1.2 * * RULE 8.3 (Required): * For each function parameter the type given in the declaration * and definition shall be identical, and the return types shall also * be identical. * * Implemented by messages: * 624 Function '%s' is declared using typedefs which are * different to those in a previous declaration. * * 1331 Type or number of arguments doesn't match previous use * of the function. * * 1332 Type or number of arguments doesn't match prototype * found later. * * 1333 Type or number of arguments doesn't match function * definition found later. * * 3320 Type of argument no. %s differs from its type in * definition of function. * * 3675 Function parameter declared with type qualification * which differs from previous declaration. * * <<<------------------------------------------------------------ */ /* PRQA S 2982,3203,3447,3408 ++ */ #include "misra.h" #include "m2cmex.h" typedef int SPEC16; static S16 test_0803c(); /* MISRA Violation - Rule 16.5 */ static SPEC16 test_0803e(void); static S16 test_0803c( px ) /* MISRA Violation - Rule 8.1 */ const S16 *px; { return *px; } extern S16 test_0803( void ) { S16 r; r = test_0803a( 1 ); /* MISRA Violation - Rule 8.1 */ r = test_0803a( 1, 2 ); /* MISRA Violation */ r = test_0803b( 1, 2 ); /* MISRA Violation - also Rule 8.1 */ r = test_0803c( 2 ); /* MISRA Violation */ r = test_0803d( 1, 2 ); /* MISRA Violation - also Rule 8.1 */ r = test_0803e( ); return r; } extern S16 test_0803b( void ); extern S16 test_0803d( S16 x ) { return x + 1; } static S16 test_0803e(void) /* MISRA Violation */ { return 1; }