Rule Definition
Updating the loop iterator in the 'for' body makes the logic difficult to understand, can decrease the maintainability, and then be error-prone practice.
Remediation
Review the logic of the loop management to avoid altering the iterator in the 'for' header and body.
Reference
High Integrity C++ Coding Standard Manual
Related Technologies
C++
Technical Criterion
CWE-1095 - Loop Condition Value Update within the Loop
About CAST Appmarq
CAST Appmarq is by far the biggest repository of data about real IT systems. It's built on thousands of analyzed applications, made of 35 different technologies, by over 300 business organizations across major verticals. It provides IT Leaders with factual key analytics to let them know if their applications are on track.