mirror of
https://github.com/github/codeql.git
synced 2026-04-11 18:14:01 +02:00
25 lines
703 B
XML
25 lines
703 B
XML
<!DOCTYPE qhelp PUBLIC
|
|
"-//Semmle//qhelp//EN"
|
|
"qhelp.dtd">
|
|
<qhelp>
|
|
|
|
|
|
<overview>
|
|
<p>A <code>continue</code> statement only re-runs the loop if the loop condition is true. Therefore using <code>continue</code> in a loop with a constant false condition will never cause the loop body to be re-run, which is misleading.
|
|
</p>
|
|
|
|
</overview>
|
|
<recommendation>
|
|
|
|
<p>Replace the <code>continue</code> statement with a <code>break</code> statement if the intent is to break from the loop.
|
|
</p>
|
|
|
|
</recommendation>
|
|
|
|
<references>
|
|
<li>
|
|
Tutorialspoint - C Programming Language: <a href="https://www.tutorialspoint.com/cprogramming/c_continue_statement.htm">Continue Statement in C</a>.
|
|
</li>
|
|
</references>
|
|
</qhelp>
|