...
Placing a semicolon immediately following an if, for, or while condition may result in unexpected behavior.
Automated Detection
| Tool | Version | Checker | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
| Parasoft Jtest |
| CERT.MSC51.NSIF | Do not place a semicolon immediately after an if, for, or while condition | ||||||
| PVS-Studio |
| V6063 | |||||||
| SonarQube |
| EmptyStatementUsageCheck |
Bibliography
§2.7.2, "Errors of Omission and Addition" |
...
...