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

Table Of Contents
Reference:
4300 Overflow while computing constant in left shift operation
Cause:
An overflow occurred while evaluating a constant in a left shift operation.
Example:
#define COUNT 24
#define ALPHA 0x0000EF
int main() {
int a = ALPHA << COUNT;
}
Action:
Correct the constant expression so that it does not overflow.
Reference:
4301 expression has no effect
Cause:
The expression has no effect or side-effect.
Example:
#define foo(A) 0
int main() {
int A = 0;
foo(A);
}
Action:
Remove or correct the expression. In some cases the expression might be the result of a valid macro
expansion, in such scenarios you can suppress this warning for the particular macro using the
+Wmacro option.
Reference:
4314 if statement without body, did you insert an extra ';'?
Cause:
The if statement does not have a body. No action is performed when the if condition is met.
Example:
int main() {
if (1) ;
}
Action:
Check if you inadvertently inserted a ';'.
Reference:
4315 %s loop without body, did you insert an extra ';'?
Cause:
The loop statement does not have a body.
Example: for (i=0; i<10; i++) ; // warning 4315 here
Action:
4300 Overflow while computing constant in left shift operation 65