![]() |
|
MISRA-C:2004 Rule 8.3: (Required) |
|
||||
![]() | |||||||
Example Code:
/* 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;
}
QAC messages that encompass this guideline:
| 0624 | 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. |
|
||
(c) The Motor Industry Research Association, 2004
|
QA C Source Code Analyser 8.1.2
MISRA-C:2004 Compliance Module 3.2 © 2013 Programming Research www.programmingresearch.com |
Personality Groups | Glossary | Message Index | MISRA-C:2004 Rule Index | Contents |