It is almost always an error when a for loop's stop condition and incrementer don't act on the same variable. Even when it is not, it could confuse future maintainers of the code, and should be avoided.

Noncompliant Code Example

for (i = 0; i < 10; j++) {  // Noncompliant
  // ...
}

Compliant Solution

for (i = 0; i < 10; i++) {
  // ...
}