MISRA.FUNC.NOPROT.CALLFunction is called but has no prototype.
MISRA-C 2004 Rule 8.1 (required): Functions shall have prototype declarations and the prototype shall be visible at both the function definition and call.Function is called but has no prototype. [Undefined 22, 23] The use of prototypes enables the compiler to check the integrity of function definitions and calls. Without prototypes the compiler is not obliged to pick up certain errors in function calls (e.g. different number of arguments from the function body, mismatch in types of arguments between call and definition). Function interfaces have been shown to be a cause of considerable problems, and therefore this rule is considered very important. The recommended method of implementing function prototypes for external functions is to declare the function (i.e. give the function prototype) in a header file, and then include the header file in all those code files that need the prototype (see Rule 8.8). The provision of a prototype for a function with internal linkage is a good programming practice. |