diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2019-06-20 12:51:23 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2019-06-22 11:30:54 +0200 |
commit | c8a5e33fcdde322f486d6c69e7e16fa346793fc9 (patch) | |
tree | ea7d12c03048fab6e0cbc7571b779c592d610512 | |
parent | b91b3d807d3e049358027d53ec5e4574e16850b3 (diff) | |
download | nx-libs-c8a5e33fcdde322f486d6c69e7e16fa346793fc9.tar.gz nx-libs-c8a5e33fcdde322f486d6c69e7e16fa346793fc9.tar.bz2 nx-libs-c8a5e33fcdde322f486d6c69e7e16fa346793fc9.zip |
Suppress false positives in static analysis
there's more work to do...
The whole nx-X11/extras dir is no longer checked since we only have
Mesa there and we do not want to check that mess...
All the exceptions in static-analysis-suppressions have been manually
checked.
-rwxr-xr-x | run-static-analysis.sh | 4 | ||||
-rw-r--r-- | static-analysis-suppressions | 26 |
2 files changed, 28 insertions, 2 deletions
diff --git a/run-static-analysis.sh b/run-static-analysis.sh index 0524c469a..a9368973b 100755 --- a/run-static-analysis.sh +++ b/run-static-analysis.sh @@ -6,9 +6,9 @@ if [[ "${STATIC_ANALYSIS}" == "yes" ]]; then echo 'Error: cppcheck is not installed.' >&2 exit 1 fi - CPPCHECK_OPTS='--error-exitcode=0 --force --quiet' + CPPCHECK_OPTS='--error-exitcode=0 --force --quiet --suppressions-list=./static-analysis-suppressions' # we exclude some external projects - CPPCHECK_EXCLUDES='-i ./nx-X11/extras/Mesa* -i ./nx-X11/extras/Mesa_* -i nx-X11/programs/Xserver/GL/mesa*' + CPPCHECK_EXCLUDES='-i ./nx-X11/extras/ -i nx-X11/programs/Xserver/GL/mesa* -i ./.pc -i ./nx-X11/.build-exports -i ./nx-X11/exports -i ./doc' echo "$(cppcheck --version):"; cppcheck $CPPCHECK_OPTS $CPPCHECK_EXCLUDES .; fi diff --git a/static-analysis-suppressions b/static-analysis-suppressions new file mode 100644 index 000000000..ebd6156e9 --- /dev/null +++ b/static-analysis-suppressions @@ -0,0 +1,26 @@ +memleak:nx-X11/programs/Xserver/dix/gc.c +memleak:nx-X11/lib/include/xtrans/Xtrans.c:982 +memleak:nx-X11/lib/include/xtrans/Xtrans.c:987 +memleak:nx-X11/lib/include/xtrans/Xtrans.c:1004 +memleak:nx-X11/lib/include/xtrans/Xtrans.c:1009 +uninitvar:nx-X11/lib/include/xtrans/Xtranssock.c:1107 +uninitvar:nx-X11/lib/include/xtrans/Xtranssock.c:1109 +uninitvar:nx-X11/lib/include/xtrans/Xtranssock.c:1146 +uninitvar:nx-X11/lib/include/xtrans/Xtranssock.c:1148 +memleak:nx-X11/lib/include/xtrans/Xtranssock.c:2446 +memleak:nx-X11/lib/include/xtrans/Xtranssock.c:2458 +nullPointer:nx-X11/programs/Xserver/Xext/security.c +nullPointerArithmetic:nx-X11/programs/Xserver/randr/rrcrtc.c +nullPointerArithmetic:nx-X11/programs/Xserver/randr/rroutput.c +nullPointerArithmetic:nx-X11/programs/Xserver/randr/rrprovider.c +nullPointerArithmetic:nx-X11/programs/Xserver/randr/rrscreen.c +memleak:nx-X11/programs/Xserver/render/render.c:2929 +memleak:nx-X11/programs/Xserver/render/render.c:2991 +memleak:nx-X11/programs/Xserver/render/render.c:3049 +memleak:nx-X11/programs/Xserver/render/render.c:3103 +memleak:nx-X11/programs/Xserver/render/render.c:3157 +memleak:nx-X11/programs/Xserver/render/render.c:3288 +doubleFree:nx-X11/programs/Xserver/hw/nxagent/Keyboard.c:1699 +uninitStructMember:nx-X11/programs/Xserver/mi/miwideline.c:190 +invalidFree:nxcomp/src/EncodeBuffer.cpp:84 +invalidFree:nxcomp/src/EncodeBuffer.cpp:106 |