다음을 통해 공유


PREfast Warning 292 (Windows CE 5.0)

Send Feedback

292 - Ill-defined for-loop.
Additional Information: Counts up from "maximum". 

This warning indicates that PREfast has detected a for-loop that might not function as intended.

This warning occurs when PREfast detects a loop that counts up from a maximum, but has a lower termination condition. This loop terminates only after integer overflow occurs.

Example

Defective Source

signed char i;

for (i = 100; i >= 0; i++) { ; }

Corrected Source

signed char i;

for (i = 100; i >= 0; i--) { ; }

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.