PREfast Warning 289 (Windows CE 5.0)
289 - Incorrect operator.
Additional Information: Mutual exclusion over || is always TRUE.
Question: Was && intended?
This warning indicates that an expression was detected where a variable is being tested against two different constants with the result depending on either conditions being TRUE. This is always the case.
This problem is commonly caused by using || in place of && but can also be caused by using != where == was intended.
Example
Defective Source
if ((x != 1) || (x != 2)) {;}
Corrected Source
if ((x != 1) && (x != 2)) {;}
// or
if ((x == 1) || (x == 2)) {;}
Send Feedback on this topic to the authors