HP Code Advisor Diagnostics Reference Guide (5900-1865, July 2011)
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:
2.111 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:
2.112 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:
2.113 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();
56 Diagnostics Details