HP Code Advisor Diagnostics

Declare the 1-bit bit field as unsigned.
Reference:
2111 statement is unreachable
Cause:
Code at this location will never be executed. Often unreachable statements represent a real coding
error such as a wrongly inserted return, goto, throw or call to non-returning functions etc.
Example:
return 0;
i++; // warning 2111 here
Action:
Check for incorrectly placed unconditional control transfer statements.
Reference:
2117 non-void %n should return a value
Cause:
A function that returns a value does not end with a return statement. If function execution reaches
the end of the function, the implied return statement that executes will return an undefined
value.
Example:
int foo() {
return;
}
Action:
End a non-void function with an appropriate return value.
Reference:
2120 return value type does not match the function type
Cause:
Value returned by the function does not match the return type of the function.
Example:
typedef char* caddr;
int foo() {
caddr data = "0x1";
return data;
}
Action:
Return a value that matches or is compatible with the return type of the function.
Reference:
2128 loop is not reachable from preceding code
Cause:
A loop has been detected by the compiler which can never be reached.
Example:
int main() {
if (1)
2111 statement is unreachable 31