MISRA Discussion Forums
Rule 8.3 - incorrect example or missing comment - Printable Version

+- MISRA Discussion Forums (https://forum.misra.org.uk)
+-- Forum: MISRA C (https://forum.misra.org.uk/forumdisplay.php?fid=4)
+--- Forum: MISRA-C:2004 Exemplar Suite (https://forum.misra.org.uk/forumdisplay.php?fid=116)
+--- Thread: Rule 8.3 - incorrect example or missing comment (/showthread.php?tid=509)



Rule 8.3 - incorrect example or missing comment - pkruk - 12-05-2008

Function declaration in mc2_0803.h:
Code:
extern void mc2_0803_2 ( my_s32bit_int param0803 );
Function definition in mc2_0803_2.c:
Code:
void mc2_0803_2 ( my_other_s32bit_int param0803 )

The types are different (different typedef names) - either there should be "Not Compliant" comment or the type should be changed.


Re: Rule 8.3 - incorrect example or missing comment - misra-c - 21-05-2008

Function definition in mc2_0803_2.c:
Code:
void mc2_0803_2 ( my_other_s32bit_int param0803 )
This line is inconsistent with the prototype declaration in the header file and should be marked as "Not Compliant".
Well spotted!