[previous] 0624 [next] Function '%s' is declared using typedefs which are different to those in a previous declaration.
Declarations and Definitions REFERENCE - ISO:C90-6.1.2.6 Compatible Type and Composite Type

This function has been declared in a slightly different way in an earlier declaration. The declarations are "type compatible" but not "typedef" compatible.

This is not recommended practice although it is permitted in the C standard.

For example:


/*PRQA S 2017,2213,3210,3211,3447,3448,3603 ++*/

typedef int INT;
typedef int XXX;

extern int foo1(void);
extern INT foo1(void) { return 1; }     /* Message 0624 */

extern int foo2(void);
extern INT foo2(void);                  /* Message 0624 */

extern INT foo3(void);
extern XXX foo3(void);                  /* Message 0624 */

extern void foo4(int x);
extern void foo4(XXX x);                /* Message 0624 */


MISRA-C:2004 Rules applicable to message 0624:

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.


QA·C Source Code Analyser 8.1
MISRA-C:2004 Compliance Module 3.2
© 2012 Programming Research.
www.programmingresearch.com
Personality Groups | Glossary | Message Index | MISRA-C:2004 Rule Index Contents