Files
codeql/cpp/ql/src/Likely Bugs/Arithmetic/UnsignedGEZero.qhelp
2018-08-02 17:53:23 +01:00

28 lines
587 B
XML

<!DOCTYPE qhelp PUBLIC
"-//Semmle//qhelp//EN"
"qhelp.dtd">
<qhelp>
<overview>
<p>This rule finds expressions of the form <code>x >= 0</code> where <code>x</code> is an unsigned value. This comparison is pointless as it will always yield <code>1</code>.</p>
</overview>
<recommendation>
<p>Check the expression to see whether a different semantics was intended.</p>
</recommendation>
<example><sample src="UnsignedGEZero.cpp" />
</example>
<references>
<li>
<a href="http://www.cplusplus.com/doc/tutorial/variables/">Variables. Data types.</a>
</li>
</references>
</qhelp>