Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
236 - (<expression> || <non-zero constant>) is always TRUE.
Question: Was the bitwise-and operator intended?This warning indicates that a constant value greater than one was detected on the right side of a logical-OR operation that occurs in a test context. The resulting expression always evaluates to TRUE.
A constant value greater than one suggests that | or & might have been intended. If not, consider using a constant that evaluates to 1.
Example
Defective Source
if (x || 3) {;}
Corrected Source
if (x & 3) {;}
Send Feedback on this topic to the authors