You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Ill-defined for-loop: Loop body only executed once
10
+
> Ill-defined for-loop. Loop body only executed once.
12
11
13
12
## Remarks
14
13
15
-
This warning indicates that a for-loop might not function as intended. When the index is unsigned and a loop counts down from zero, its body is run only once.
14
+
This warning indicates that a for-loop might unintentionally execute only once. A loop with an unsigned index counting down from zero or a mistaken use of `==` might cause this warning.
16
15
17
16
Code analysis name: `LOOP_ONLY_EXECUTED_ONCE`
18
17
19
18
## Example
20
19
21
-
The following code generates this warning:
20
+
The following example generates C6296. Each for-loop shown executes exactly once.
0 commit comments