MISRAC2004-8.3
In this section:
Synopsis
(Required) For each function parameter the type given in the declaration and definition shall be identical, and the return types shall also be identical.
Enabled by default
Yes
Severity/Certainty
Low/Medium

Full description
A declaration and definition for a function were found that use different type qualifiers. This check is identical to CERT-EXP37-C_b.
This is a link analysis check.
Coding standards
- CERT EXP37-C
Call functions with the arguments intended by the API
- MISRA C:2004 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.
Code examples
The following code example fails the check and will give a warning:
typedef int INT;
void foo(int i);
void foo(INT i) {}
The following code example passes the check and will not give a warning about this issue:
void foo(int i);
void foo(int i) {}