annotate Applications/Resources/RunCppCheck.sh @ 1934:00edc8504b68

todo
author Alain Mazy <am@osimis.io>
date Mon, 25 Apr 2022 09:15:08 +0200
parents ebe4fd1ad311
children 187a261d7ae2
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
1589
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1583
diff changeset
3 # Stone of Orthanc
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1583
diff changeset
4 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1583
diff changeset
5 # Department, University Hospital of Liege, Belgium
1871
7053b8a0aaec upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1870
diff changeset
6 # Copyright (C) 2017-2022 Osimis S.A., Belgium
7053b8a0aaec upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1870
diff changeset
7 # Copyright (C) 2021-2022 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
1589
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1583
diff changeset
8 #
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1583
diff changeset
9 # This program is free software: you can redistribute it and/or
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1583
diff changeset
10 # modify it under the terms of the GNU Affero General Public License
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1583
diff changeset
11 # as published by the Free Software Foundation, either version 3 of
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1583
diff changeset
12 # the License, or (at your option) any later version.
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1583
diff changeset
13 #
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1583
diff changeset
14 # This program is distributed in the hope that it will be useful, but
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1583
diff changeset
15 # WITHOUT ANY WARRANTY; without even the implied warranty of
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1583
diff changeset
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1583
diff changeset
17 # Affero General Public License for more details.
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1583
diff changeset
18 #
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1583
diff changeset
19 # You should have received a copy of the GNU Affero General Public License
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1583
diff changeset
20 # along with this program. If not, see <http://www.gnu.org/licenses/>.
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1583
diff changeset
21
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1583
diff changeset
22
1571
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 set -ex
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 CPPCHECK=cppcheck
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 if [ $# -ge 1 ]; then
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 CPPCHECK=$1
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 fi
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 cat <<EOF > /tmp/cppcheck-suppressions.txt
1573
32e0c007789d cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1571
diff changeset
32 stlFindInsert:../../Applications/Samples/WebAssembly/SingleFrameViewer/SingleFrameViewerApplication.h
1878
c9ccd13c6a3c cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1877
diff changeset
33 stlFindInsert:../../Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp:508
c9ccd13c6a3c cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1877
diff changeset
34 stlFindInsert:../../Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp:1151
1571
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 unpreciseMathCall:../../OrthancStone/Sources/Scene2D/Internals/CairoFloatTextureRenderer.cpp
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 unpreciseMathCall:../../OrthancStone/Sources/Scene2D/LookupTableTextureSceneLayer.cpp
1582
cdd1932c530c fix cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1581
diff changeset
37 unreadVariable:../../OrthancStone/Sources/Viewport/SdlViewport.cpp:143
cdd1932c530c fix cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1581
diff changeset
38 unreadVariable:../../OrthancStone/Sources/Viewport/SdlViewport.cpp:197
1571
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 unusedFunction
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 EOF
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 ${CPPCHECK} --enable=all --quiet --std=c++11 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 --suppressions-list=/tmp/cppcheck-suppressions.txt \
1573
32e0c007789d cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1571
diff changeset
44 -DHAS_ORTHANC_EXCEPTION=1 \
1571
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 -DORTHANC_BUILDING_FRAMEWORK_LIBRARY=1 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 -DORTHANC_ENABLE_BASE64=1 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 -DORTHANC_ENABLE_CIVETWEB=0 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 -DORTHANC_ENABLE_CURL=1 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 -DORTHANC_ENABLE_DCMTK=1 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 -DORTHANC_ENABLE_DCMTK_JPEG=1 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 -DORTHANC_ENABLE_DCMTK_JPEG_LOSSLESS=1 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 -DORTHANC_ENABLE_GLEW=1 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 -DORTHANC_ENABLE_JPEG=1 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 -DORTHANC_ENABLE_LOCALE=1 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 -DORTHANC_ENABLE_LOGGING=1 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 -DORTHANC_ENABLE_LOGGING_STDIO=1 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 -DORTHANC_ENABLE_MD5=1 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 -DORTHANC_ENABLE_MONGOOSE=0 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 -DORTHANC_ENABLE_OPENGL=1 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 -DORTHANC_ENABLE_PKCS11=0 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 -DORTHANC_ENABLE_PNG=1 \
1639
5cdc5b98f14d cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1589
diff changeset
62 -DORTHANC_ENABLE_PUGIXML=1 \
1571
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 -DORTHANC_ENABLE_SDL=1 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 -DORTHANC_ENABLE_SSL=1 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 -DORTHANC_ENABLE_THREADS=1 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66 -DORTHANC_ENABLE_WASM=1 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67 -DORTHANC_ENABLE_ZLIB=1 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68 -DORTHANC_SANDBOXED=0 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69 -D__GNUC__ \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70 -D__cplusplus=201103 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71 -D__linux__ \
1573
32e0c007789d cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1571
diff changeset
72 -DEM_ASM \
1571
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
73 -UNDEBUG \
1914
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1878
diff changeset
74 -I${HOME}/Subversion/orthanc/OrthancFramework/Sources \
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1878
diff changeset
75 -I${HOME}/Subversion/orthanc/OrthancServer/Plugins/Include/ \
1571
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
76 \
1573
32e0c007789d cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1571
diff changeset
77 ../../Applications/Samples \
32e0c007789d cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1571
diff changeset
78 ../../Applications/StoneWebViewer \
1582
cdd1932c530c fix cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1581
diff changeset
79 ../../OrthancStone/Sources \
1877
a2955abe4c2e skeleton for the RenderingPlugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1871
diff changeset
80 ../../RenderingPlugin/Sources \
1582
cdd1932c530c fix cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1581
diff changeset
81 \
cdd1932c530c fix cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1581
diff changeset
82 -i ../../Applications/Samples/RtViewerPlugin/i \
cdd1932c530c fix cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1581
diff changeset
83 -i ../../Applications/Samples/Sdl/i \
cdd1932c530c fix cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1581
diff changeset
84 -i ../../Applications/Samples/WebAssembly/i \
cdd1932c530c fix cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1581
diff changeset
85 -i ../../Applications/StoneWebViewer/Plugin/i \
cdd1932c530c fix cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1581
diff changeset
86 -i ../../Applications/StoneWebViewer/WebAssembly/StoneModule/i \
cdd1932c530c fix cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1581
diff changeset
87 -i ../../Applications/StoneWebViewer/WebAssembly/i \
1639
5cdc5b98f14d cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1589
diff changeset
88 -i ../../Applications/StoneWebViewer/WebAssembly/debug/ \
1571
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89 \
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
90 2>&1