HP Code Advisor Diagnostics Reference Guide (5900-1865, July 2011)

2.74 2513 a value of type %t1 cannot be assigned to an entity of type
%t2
Cause:
The types of variables used in the assignment are incompatible.
Example:
long double d = 0.0;
char *c = 0;
c =
Action:
Check if the assignment is required and if it is valid. If valid, use an explicit cast to force the
assignment.
Reference:
2.75 2546 transfer of control bypasses initialization of: "variable"
Cause:
Compiler has detected transfer of control was attempted that bypasses initialization of a variable.
Example:
int main() {
goto LABEL;
int i = 20;
LABEL:
printf("jumped to LABEL\n");
}
Action:
Rewrite the code such that declarations/initializations are not provided within the code segment
which can be bypassed because of explicit transfer of control.
Reference:
2.76 2549 "variable" is used before its value is set
Cause:
A variable's value has been used without being set. The algorithms that detect this situation only
report it once for a given variable, and not necessarily at the first use of the uninitialized value.
Example:
int i;
printf("%d", i);
Action:
Provide the variable with a value before the variable is used. If you only provide a value for the
use reported here, you may find that when you recompile your program another uninitialized use
is detected. It is best to initialize variables as close as possible to the point of declaration.
Reference:
2.77 2550 %n was set but never used
Cause:
This identifier is set but never referenced in the current translation unit.
2.74 2513 a value of type %t1 cannot be assigned to an entity of type %t2 45