Checkers:SEMICOL

From current

Misplaced semicolon. The parser may not recognize a misplaced semicolon in some situations. An error is printed in the following cases:

if(...);
while (...); {...}
for (...); {...}

Vulnerability and risk

Potentially a critical problem.

Example 1

1  void foo(){
2    for (i=0;i<10;i++); // suspiciously placed semicolon here
3    {
4      do_this();
5    }
6  }

Security Guidelines