FUNC-unprototyped-used
In this section:
Synopsis
Arguments are passed to functions without a valid prototype.
Enabled by default
Yes
Severity/Certainty
Low/Low

Full description
Arguments are passed to functions without a valid prototype. This is permitted in C89, but it is unsafe because it bypasses all type checking.
Coding standards
- CERT DCL20-C
Always specify void even if a function accepts no arguments
- CERT DCL31-C
Declare identifiers before using them
Code examples
The following code example fails the check and will give a warning:
void func(); /* not a valid prototype in C */
void func2(void)
{
func(77);
func(77.0);
}
The following code example passes the check and will not give a warning about this issue:
void func(void);
void func2(void)
{
func();
}