You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 5, 2024. It is now read-only.
Sometimes it is necessary to pass additional include directories. I have
attached an example of why this is necessary and the different results are
found below. Basically if cppcheck can't find a header file that includes
a typedef it does not include that variable for check as uninitialized (I'm
not sure what else it would miss).
Executing '"C:\Program Files\Cppcheck\cppcheck.exe" --xml "-j 1"
--enable=style,possibleError --force
C:\ide-4.6-workspace\cppcheck_example\src\main.c'
<?xml version="1.0"?>
Checking C:\ide-4.6-workspace\cppcheck_example\src\main.c...
<results>
<error file="C:\ide-4.6-workspace\cppcheck_example\src\main.c" line="8"
id="unassignedVariable" severity="style" msg="Variable 'uninit_i32' is not
assigned a value"/>
<error file="C:\ide-4.6-workspace\cppcheck_example\src\main.c" line="12"
id="uninitvar" severity="error" msg="Uninitialized variable: uninit_i32"/>
</results>
Duration 110 ms.
Compared with calling it from console with the includes directory passed as
argument.
C:\ide-4.6-workspace\cppcheck_example>"C:\Program
Files\Cppcheck\cppcheck.exe" --force --enable=style,possibleError -I
includes src/main.c
Checking src\main.c...
[src\main.c:8]: (style) Variable 'uninit_i32' is not assigned a value
[src\main.c:8]: (style) Variable 'uninit_i32_header' is not assigned a value
[src\main.c:12]: (error) Uninitialized variable: uninit_i32
[src\main.c:15]: (error) Uninitialized variable: uninit_i32_header
Original issue reported on code.google.com by konra...@gmx.de on 16 May 2010 at 11:31
Original issue reported on code.google.com by
konra...@gmx.de
on 16 May 2010 at 11:31Attachments:
The text was updated successfully, but these errors were encountered: