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

Table Of Contents
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)
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:
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:
2826 %n was never referenced
Cause:
This function definition contains a parameter n that was never referenced.
Example: int foo( int i) {
return 0;
}
Action:
Examine your code to determine if this function parameter is needed in this function.
46 Diagnostics Details