V683. Consider inspecting the loop expression. It is possible that the 'i' variable should be incremented instead of the 'n' variable.

The analyzer has detected a potential error in a loop: there may be a typo which causes a wrong variable to be incremented/decremented.

For example:

void Foo(float *Array, size_t n)
  for (size_t i = 0; i != n; ++n)

The variable 'n' is incremented instead of the variable 'i'. It results in an unexpected program behavior.

This is the fixed code:

for (size_t i = 0; i != n; ++i)

According to Common Weakness Enumeration, potential errors found by using this diagnostic are classified as CWE-190.

Bugs Found

Checked Projects
Collected Errors
14 111
This website uses cookies and other technology to provide you a more personalized experience. By continuing the view of our web-pages you accept the terms of using these files. If you don't want your personal data to be processed, please, leave this site. Learn More →