다음을 통해 공유


PREfast Warning 237 (Windows CE 5.0)

Send Feedback

237 - (<zero> && <expression>) is always FALSE.
Consequence: <expression> is never evaluated and may have side effects.

This warning indicates that a constant value of zero was detected on the left side of a logical AND operation that occurs in a test context.

The resulting expression always evaluates to FALSE and any side effect occurring on the right side of the expression is lost.

Examine the right side of the expression carefully to ensure that any side effects needed for proper functionality are not lost.

The (0 && n) construction is commonly used to disable the result of a test.

Example

Defective Source

if (0 && x++) {;}

Corrected Source

if (0) {
    if (*x)++) {;}
}

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.