HP-UX Cadvise Diagnostics Reference Guide (5900-1865, August 2012)

Table Of Contents
4241 redeclaration, function %nod was previously called without a
prototype
Cause:
The switch expression type does not match with the type of case labels.
Example:
enum BOOLEAN { TRUE = 0, FALSE = 1 };
BOOLEAN a_bool = TRUE;
switch(a_bool) {
case 0: printf("true\n");
case 1: printf("false\n");
default: printf("no match found \n");
}
Action:
Fix your source code to ensure the type of the switch expression and case labels is same.
Reference:
4242 No prototype or definition in scope for call to %sq
Cause:
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() {
56 Diagnostics Details