HP Code Advisor Diagnostics

Action:
Use valid/compatible operand types or use a cast operator to convert one operand type to the
other type.
Reference:
2047 incompatible redefinition of macro %nod
Cause:
A #define preprocessing directive has redefined a macro whose previous definition contained
an error or warning. Normally, the compiler will issue a warning if a macro is redefined to
something other than the previous definition. However, if the previous definition caused a
warning or error to be generated, this informational message is output instead.
Example:
#define KM_SLEEP 0
#define KM_SLEEP 1
Action:
Do not redefine a macro without first undefining it.
Reference:
C99 6.9.3
2054 Too few arguments in macro invocation
Cause:
Some parameter/s is/are omitted during macro invocation.
Example:
#define FOO(a, b, c) (( a << 3 ) | b)
int a, b;
int main() {
(void) FOO(a, b);
}
Action:
Pass right number of parameters during macro invocation.
Reference:
2063 shift count is too large
Cause:
The compiler has detected a shift count that is greater than or equal to the size of the operand to
be shifted. This may not be your intent, as the result contains none of the original bits of the
operand.
Example:
int main() {
int a = 1 << 32;
}
Action:
Avoid using the shift count greater than number of bits a given type can hold.
28 Diagnostics Details