HP Code Advisor Diagnostics

Prototypes are optional in ANSI C, however their use can prevent a wide range of common
programming errors which are otherwise difficult to detect. This call site provides no prior
prototype or definition so the compiler cannot verify the correctness of the argument list.
Example:
int main() {
foo(10.0f);
}
Action:
Provide a prototype declaration for the function before calling that function.
Reference:
4243 function declared with empty parentheses, consider replacing with
a prototype
Cause:
The declaration of function has an empty parameter list. If the function has parameters, they
should be declared here; if it has no parameters, "void" should be specified in the parameter list.
Example:int foo();
Action:
The recommended way to declare a function that takes no parameters is to use "void" in the
parameter list.
Reference:
4244 extern storage class used with a function definition
Cause:
The compiler has detected the usage of an extern storage class specifier with a function definition.
Example:
extern int foo() {
return 0;
}
Action:
Remove the extern storage class specifier in function definition.
Reference:
4245 storage class used with a data definition
Cause:
The compiler has detected the usage of an extern storage class specifier with a data definition.
Example:extern int i = 1;
Action:
Remove the extern storage class specifier in the data definition.
Reference:
4247 function called with different argument counts (%s vs. %s2)
Cause:
60 Diagnostics Details