annotate OrthancStone/Resources/RunCppCheck.sh @ 1574:fb5e620430ae

fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 21 Sep 2020 18:29:53 +0200
parents 32e0c007789d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1571
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 #!/bin/bash
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 set -ex
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 CPPCHECK=cppcheck
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 if [ $# -ge 1 ]; then
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 CPPCHECK=$1
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 fi
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 cat <<EOF > /tmp/cppcheck-suppressions.txt
1573
32e0c007789d cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1571
diff changeset
12 stlFindInsert:../../Applications/Samples/WebAssembly/SingleFrameViewer/SingleFrameViewerApplication.h
32e0c007789d cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1571
diff changeset
13 stlFindInsert:../../Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp:658
1571
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 unpreciseMathCall:../../OrthancStone/Sources/Scene2D/Internals/CairoFloatTextureRenderer.cpp
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 unpreciseMathCall:../../OrthancStone/Sources/Scene2D/LookupTableTextureSceneLayer.cpp
1573
32e0c007789d cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1571
diff changeset
16 unreadVariable:../../OrthancStone/Sources/Viewport/SdlViewport.cpp:135
32e0c007789d cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1571
diff changeset
17 unreadVariable:../../OrthancStone/Sources/Viewport/SdlViewport.cpp:193
1571
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 unusedFunction
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 useInitializationList:../../OrthancStone/Sources/OpenGL/OpenGLProgram.cpp:36
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 EOF
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 ${CPPCHECK} --enable=all --quiet --std=c++11 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 --suppressions-list=/tmp/cppcheck-suppressions.txt \
1573
32e0c007789d cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1571
diff changeset
24 -DHAS_ORTHANC_EXCEPTION=1 \
1571
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 -DORTHANC_BUILDING_FRAMEWORK_LIBRARY=1 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 -DORTHANC_ENABLE_BASE64=1 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 -DORTHANC_ENABLE_CIVETWEB=0 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 -DORTHANC_ENABLE_CURL=1 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 -DORTHANC_ENABLE_DCMTK=1 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 -DORTHANC_ENABLE_DCMTK_JPEG=1 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 -DORTHANC_ENABLE_DCMTK_JPEG_LOSSLESS=1 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 -DORTHANC_ENABLE_GLEW=1 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 -DORTHANC_ENABLE_JPEG=1 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 -DORTHANC_ENABLE_LOCALE=1 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 -DORTHANC_ENABLE_LOGGING=1 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 -DORTHANC_ENABLE_LOGGING_STDIO=1 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 -DORTHANC_ENABLE_MD5=1 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 -DORTHANC_ENABLE_MONGOOSE=0 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 -DORTHANC_ENABLE_OPENGL=1 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 -DORTHANC_ENABLE_PKCS11=0 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 -DORTHANC_ENABLE_PNG=1 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 -DORTHANC_ENABLE_PUGIXML=0 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 -DORTHANC_ENABLE_SDL=1 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 -DORTHANC_ENABLE_SSL=1 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 -DORTHANC_ENABLE_THREADS=1 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 -DORTHANC_ENABLE_WASM=1 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 -DORTHANC_ENABLE_ZLIB=1 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 -DORTHANC_SANDBOXED=0 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 -D__GNUC__ \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 -D__cplusplus=201103 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 -D__linux__ \
1573
32e0c007789d cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1571
diff changeset
52 -DEM_ASM \
1571
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 -UNDEBUG \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 -I/home/jodogne/Subversion/orthanc/OrthancFramework/Sources \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 ../../OrthancStone/Sources \
1573
32e0c007789d cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1571
diff changeset
57 ../../Applications/Samples \
32e0c007789d cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1571
diff changeset
58 ../../Applications/StoneWebViewer \
1571
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 2>&1