Continue statement that does not continue¶
ID: cpp/continue-in-false-loop Kind: problem Severity: warning Precision: high Tags: - correctness Query suites: - cpp-security-and-quality.qls
continue statement only re-runs the loop if the loop condition is true. Therefore using
continue in a loop with a constant false condition will never cause the loop body to be re-run, which is misleading.
continue statement with a
break statement if the intent is to break from the loop.
Tutorialspoint - C Programming Language: Continue Statement in C.