다음을 통해 공유


PREfast Warning 282 (Windows CE 5.0)

Send Feedback

282 - Incorrect operator.
Additional Information: Assignment to constant in test context.
Question: Was == intended?This warning indicates that an assignment to a constant was detected in a test context.

Assignment to a constant in a test context is almost always incorrect.

Replace the = with ==, or remove the assignment from the test context to resolve this warning.

Example

Defective Source

while (a = 5) {
    ;
}

Corrected Source

while (a == 5) {
    ;
}

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.