HP Code Advisor Diagnostics

This warning is issued when mixing different enums or non-enums with enums.
Example:
enum Bool { FALSE = 0, TRUE = 1};
enum Bool b = FALSE + 1;
Action:
Make sure that you do not mix enums and non-enums.
Reference:
2191 type qualifier is meaningless on cast type
Cause:
Casting to a qualified type, though valid, is pointless. This is reported only when the cv-qualifiers
are explicit in the cast,not, for example, when they are hidden in a typedef or template parameter
type.
Example: int i = (const volatile int) 10;
Action:
Remove the unnecessary qualifiers in the cast.
Reference:
2192 unrecognized character escape sequence
Cause:
An escape sequence consists of a '\' (backslash) character followed by one or more characters.
This diagnostic is issued if the character following the '\' is not known or not recognized by the
compiler.
Example: printf("%c", '\z');
Action:
Check if the character provided after the '\' character is really a recognized escape sequence
character.
Reference:
C99 5.2.1, 5.2.2
2193 zero used for undefined preprocessing identifier
Cause:
An identifier found in an #if or #elif is not defined. The compiler will replace the identifier with
the constant zero.
Example:
int main() {
#if MACRO
return 0;
#endif //MACRO
return 1;
}
Action:
Verify the use of the identifier.
Reference:
36 Diagnostics Details