다음을 통해 공유


PREfast Warning 315 (Windows CE 5.0)

Send Feedback

315 - Incorrect order of operations.
Additional Information: Bitwise-and has higher precedence than bitwise-or.
Recommended Fix: Add parentheses to clarify intent.

This message indicates that PREfast has detected an expression in a test context that contains both bitwise-AND (&) and bitwise-OR (|) operations but results in a constant because the bitwise-OR operation happens last.

Add parentheses to clarify intent.

Example

Defective Source

if (i & 2|4)

Corrected Source

if (i & (2|4))

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.