HP Code Advisor Diagnostics Reference Guide (5900-1865, July 2011)
Example:
int main() {
int var;
var = 20;
}
Action:
Examine your code to determine if this definition is needed in this module.
Reference:
2.78 2656 transfer of control into a try block
Cause:
Goto statements cannot be used to transfer control inside the try blocks.
Example:
goto LABEL;
try {
LABEL:
throw 0;
} catch(...) {
}
Action:
Remove the goto statement that transfers the control inside the try block.
Reference:
ANSI/ISO C++ 15(2)
2.79 2767 conversion from pointer to smaller integer
Cause:
The 64-bit pointer is being cast to an integer type that is smaller in size. Casting a 64-bit pointer
to a smaller integer type is undefined behavior. This also could indicate code that relies on pointers
and integers being the same size. The code will cause an unexpected loss of data on 64-bit
platforms.
Example:
int *p = 0;
int i = (int) p;
Action:
If this is the intended behavior, first cast the pointer to a 64-bit integer, then cast the result to the
desired integer type.
Reference:
2.80 2815 type qualifier on return type is meaningless
Cause:
A type qualifier has been used as part of a funtion's return type. The type qualifiers have no
meaning for function return values.
Example: const int foo() { return 10; }
Action:
Remove the type qualifier in the return type of the function.
Reference:
46 Diagnostics Details