cdemo/cppcheck_report.xml

93 lines
8.2 KiB
XML
Raw Normal View History

2026-04-08 07:38:04 +00:00
<?xml version="1.0" encoding="UTF-8"?>
<results version="2">
<cppcheck version="2.20.0"/>
<errors>
<error id="missingIncludeSystem" severity="information" msg="Include file: &lt;iostream&gt; not found. Please note: Standard library headers do not need to be provided to get proper results." verbose="Include file: &lt;iostream&gt; not found. Please note: Standard library headers do not need to be provided to get proper results.">
<location file="src/errors.cpp" line="2" column="2"/>
</error>
<error id="arrayIndexOutOfBounds" severity="error" msg="Array &apos;arr[3]&apos; accessed at index 10, which is out of bounds." verbose="Array &apos;arr[3]&apos; accessed at index 10, which is out of bounds." cwe="788" file0="src/errors.cpp">
<location file="src/errors.cpp" line="13" column="21" info="Array index out of bounds"/>
</error>
<error id="nullPointer" severity="error" msg="Null pointer dereference: p" verbose="Null pointer dereference: p" cwe="476" file0="src/errors.cpp">
<location file="src/errors.cpp" line="7" column="19" info="Null pointer dereference"/>
<location file="src/errors.cpp" line="6" column="14" info="Assignment &apos;p=nullptr&apos;, assigned value is 0"/>
<symbol>p</symbol>
</error>
<error id="constVariablePointer" severity="style" msg="Variable &apos;p&apos; can be declared as pointer to const" verbose="Variable &apos;p&apos; can be declared as pointer to const" cwe="398" file0="src/errors.cpp">
<location file="src/errors.cpp" line="6" column="10" info="Variable &apos;p&apos; can be declared as pointer to const"/>
<symbol>p</symbol>
</error>
<error id="constVariable" severity="style" msg="Variable &apos;arr&apos; can be declared as const array" verbose="Variable &apos;arr&apos; can be declared as const array" cwe="398" file0="src/errors.cpp">
<location file="src/errors.cpp" line="12" column="9" info="Variable &apos;arr&apos; can be declared as const array"/>
<symbol>arr</symbol>
</error>
<error id="uninitvar" severity="error" msg="Uninitialized variable: val" verbose="Uninitialized variable: val" cwe="457" file0="src/errors.cpp">
<location file="src/errors.cpp" line="19" column="9"/>
<symbol>val</symbol>
</error>
<error id="missingIncludeSystem" severity="information" msg="Include file: &lt;cstdio&gt; not found. Please note: Standard library headers do not need to be provided to get proper results." verbose="Include file: &lt;cstdio&gt; not found. Please note: Standard library headers do not need to be provided to get proper results.">
<location file="src/memory.cpp" line="2" column="2"/>
</error>
<error id="missingIncludeSystem" severity="information" msg="Include file: &lt;cstdlib&gt; not found. Please note: Standard library headers do not need to be provided to get proper results." verbose="Include file: &lt;cstdlib&gt; not found. Please note: Standard library headers do not need to be provided to get proper results.">
<location file="src/memory.cpp" line="3" column="2"/>
</error>
<error id="memleak" severity="error" msg="Memory leak: data" verbose="Memory leak: data" cwe="401" file0="src/memory.cpp">
<location file="src/memory.cpp" line="9" column="1"/>
<symbol>data</symbol>
</error>
<error id="doubleFree" severity="error" msg="Memory pointed to by &apos;p&apos; is freed twice." verbose="Memory pointed to by &apos;p&apos; is freed twice." cwe="415" file0="src/memory.cpp">
<location file="src/memory.cpp" line="15" column="12"/>
<location file="src/memory.cpp" line="14" column="5"/>
<symbol>p</symbol>
</error>
<error id="resourceLeak" severity="error" msg="Resource leak: fp" verbose="Resource leak: fp" cwe="775" file0="src/memory.cpp">
<location file="src/memory.cpp" line="22" column="1"/>
<symbol>fp</symbol>
</error>
<error id="constVariablePointer" severity="style" msg="Variable &apos;data&apos; can be declared as pointer to const" verbose="Variable &apos;data&apos; can be declared as pointer to const" cwe="398" file0="src/memory.cpp">
<location file="src/memory.cpp" line="7" column="10" info="Variable &apos;data&apos; can be declared as pointer to const"/>
<symbol>data</symbol>
</error>
<error id="constVariablePointer" severity="style" msg="Variable &apos;fp&apos; can be declared as pointer to const" verbose="Variable &apos;fp&apos; can be declared as pointer to const" cwe="398" file0="src/memory.cpp">
<location file="src/memory.cpp" line="20" column="11" info="Variable &apos;fp&apos; can be declared as pointer to const"/>
<symbol>fp</symbol>
</error>
<error id="uninitdata" severity="error" msg="Memory is allocated but not initialized: p" verbose="Memory is allocated but not initialized: p" cwe="457" file0="src/memory.cpp">
<location file="src/memory.cpp" line="14" column="12"/>
<symbol>p</symbol>
</error>
<error id="unreadVariable" severity="style" msg="Variable &apos;data&apos; is assigned a value that is never used." verbose="Variable &apos;data&apos; is assigned a value that is never used." cwe="563" file0="src/memory.cpp">
<location file="src/memory.cpp" line="7" column="15"/>
<symbol>data</symbol>
</error>
<error id="unusedAllocatedMemory" severity="style" msg="Variable &apos;data&apos; is allocated memory that is never used." verbose="Variable &apos;data&apos; is allocated memory that is never used." cwe="563" file0="src/memory.cpp">
<location file="src/memory.cpp" line="7" column="10"/>
<symbol>data</symbol>
</error>
<error id="unusedAllocatedMemory" severity="style" msg="Variable &apos;p&apos; is allocated memory that is never used." verbose="Variable &apos;p&apos; is allocated memory that is never used." cwe="563" file0="src/memory.cpp">
<location file="src/memory.cpp" line="13" column="10"/>
<symbol>p</symbol>
</error>
<error id="unreadVariable" severity="style" msg="Variable &apos;fp&apos; is assigned a value that is never used." verbose="Variable &apos;fp&apos; is assigned a value that is never used." cwe="563" file0="src/memory.cpp">
<location file="src/memory.cpp" line="20" column="14"/>
<symbol>fp</symbol>
</error>
<error id="missingIncludeSystem" severity="information" msg="Include file: &lt;iostream&gt; not found. Please note: Standard library headers do not need to be provided to get proper results." verbose="Include file: &lt;iostream&gt; not found. Please note: Standard library headers do not need to be provided to get proper results.">
<location file="src/utils.cpp" line="2" column="2"/>
</error>
<error id="unreadVariable" severity="style" msg="Variable &apos;a&apos; is assigned a value that is never used." verbose="Variable &apos;a&apos; is assigned a value that is never used." cwe="563" file0="src/utils.cpp">
<location file="src/utils.cpp" line="6" column="11"/>
<symbol>a</symbol>
</error>
<error id="unreadVariable" severity="style" msg="Variable &apos;x&apos; is assigned a value that is never used." verbose="Variable &apos;x&apos; is assigned a value that is never used." cwe="563" file0="src/utils.cpp">
<location file="src/utils.cpp" line="11" column="11"/>
<symbol>x</symbol>
</error>
<error id="unusedFunction" severity="style" msg="The function &apos;unused_function&apos; is never used." verbose="The function &apos;unused_function&apos; is never used." cwe="561">
<location file="src/utils.cpp" line="5" column="13"/>
<symbol>unused_function</symbol>
</error>
<error id="checkersReport" severity="information" msg="Active checkers: 173/186 (use --checkers-report=&lt;filename&gt; to see details)" verbose="Active checkers: 173/186 (use --checkers-report=&lt;filename&gt; to see details)"/>
</errors>
</results>