Observação
O acesso a essa página exige autorização. Você pode tentar entrar ou alterar diretórios.
O acesso a essa página exige autorização. Você pode tentar alterar os diretórios.
295 - Ill-defined for-loop.
Additional Information: Unsigned values are always >= 0.
This warning indicates that PREfast has detected a for-loop that might not function as intended.
The for-loop tests an unsigned value against zero (0) with >=.
The result is always TRUE so the loop is infinite.
Example
Defective Source
unsigned char i;
for (i = 100; i >= 0; i--) { ; }
Corrected Source
unsigned char i;
for (i = 100; i > 0; i--) { ; }
Send Feedback on this topic to the authors