Menu

#182 rule: wrong for-loop increment

open
nobody
None
5
2013-02-16
2011-01-24
No

QF: Complicated, subtle or wrong increment in for-loop (QF_QUESTIONABLE_FOR_LOOP)

Are you sure this for loop is incrementing the correct variable? It appears that another variable is being initialized and checked by the for loop.

Example:

for (int x = 0; y < size; x++) { ... }

Discussion


Log in to post a comment.