mirror of
https://github.com/github/codeql.git
synced 2026-05-05 21:55:19 +02:00
QL code and tests for C#/C++/JavaScript.
This commit is contained in:
27
cpp/ql/src/Critical/NotInitialised.qhelp
Normal file
27
cpp/ql/src/Critical/NotInitialised.qhelp
Normal file
@@ -0,0 +1,27 @@
|
||||
<!DOCTYPE qhelp PUBLIC
|
||||
"-//Semmle//qhelp//EN"
|
||||
"qhelp.dtd">
|
||||
<qhelp>
|
||||
|
||||
|
||||
<overview>
|
||||
<p>
|
||||
This rule finds variables that are used before they are initialized. Values of uninitialized variables are
|
||||
undefined, as not all compilers zero out memory, especially when optimizations are enabled or the compiler
|
||||
is not compliant with the latest language standards.
|
||||
</p>
|
||||
|
||||
</overview>
|
||||
<recommendation>
|
||||
<p>
|
||||
Initialize the variable before accessing it.
|
||||
</p>
|
||||
|
||||
</recommendation>
|
||||
<example><sample src="NotInitialised.cpp" />
|
||||
|
||||
|
||||
|
||||
|
||||
</example>
|
||||
</qhelp>
|
||||
Reference in New Issue
Block a user