annotate OrthancServer/Resources/RunCppCheck.sh @ 5117:849000df79b6

fix missing handling of StoreStatus_StorageFull
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 02 Dec 2022 15:32:53 +0100
parents 027366cae766
children 482f3e80ed0a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4199
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 #!/bin/bash
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 set -ex
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 CPPCHECK=cppcheck
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 if [ $# -ge 1 ]; then
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 CPPCHECK=$1
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 fi
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10
4203
4d42408da117 improving const-correctness in ParsedDicomFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4199
diff changeset
11 cat <<EOF > /tmp/cppcheck-suppressions.txt
4d42408da117 improving const-correctness in ParsedDicomFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4199
diff changeset
12 constParameter:../../OrthancFramework/Sources/DicomParsing/FromDcmtkBridge.cpp
4204
318c16cfccab cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4203
diff changeset
13 knownArgument:../../OrthancFramework/UnitTestsSources/ImageTests.cpp
318c16cfccab cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4203
diff changeset
14 knownConditionTrueFalse:../../OrthancServer/Plugins/Engine/OrthancPlugins.cpp
5001
5a5918f2a199 fix RunCppCheck.sh
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4994
diff changeset
15 nullPointer:../../OrthancFramework/UnitTestsSources/RestApiTests.cpp:322
5050
ea9e2680da6f CPP check and cleanup
Alain Mazy <am@osimis.io>
parents: 5041
diff changeset
16 stlFindInsert:../../OrthancFramework/Sources/DicomFormat/DicomMap.cpp:1403
4858
8b51d65584f0 cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4744
diff changeset
17 stlFindInsert:../../OrthancFramework/Sources/RestApi/RestApiCallDocumentation.cpp:165
8b51d65584f0 cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4744
diff changeset
18 stlFindInsert:../../OrthancFramework/Sources/RestApi/RestApiCallDocumentation.cpp:73
5050
ea9e2680da6f CPP check and cleanup
Alain Mazy <am@osimis.io>
parents: 5041
diff changeset
19 stlFindInsert:../../OrthancServer/Sources/Database/StatelessDatabaseOperations.cpp:372
4981
d0c34145320c cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4895
diff changeset
20 stlFindInsert:../../OrthancServer/Sources/OrthancWebDav.cpp:377
4895
8f1f76b73499 fix RunCppCheck.sh for openssl 3.x
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4889
diff changeset
21 stlFindInsert:../../OrthancServer/Sources/ServerJobs/MergeStudyJob.cpp:40
8f1f76b73499 fix RunCppCheck.sh for openssl 3.x
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4889
diff changeset
22 stlFindInsert:../../OrthancServer/Sources/ServerJobs/SplitStudyJob.cpp:190
4858
8b51d65584f0 cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4744
diff changeset
23 syntaxError:../../OrthancFramework/Sources/SQLite/FunctionContext.h:52
4981
d0c34145320c cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4895
diff changeset
24 syntaxError:../../OrthancFramework/UnitTestsSources/DicomMapTests.cpp:72
4858
8b51d65584f0 cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4744
diff changeset
25 syntaxError:../../OrthancFramework/UnitTestsSources/ZipTests.cpp:132
4895
8f1f76b73499 fix RunCppCheck.sh for openssl 3.x
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4889
diff changeset
26 syntaxError:../../OrthancServer/UnitTestsSources/UnitTestsMain.cpp:310
8f1f76b73499 fix RunCppCheck.sh for openssl 3.x
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4889
diff changeset
27 uninitMemberVar:../../OrthancServer/Sources/ServerJobs/StorageCommitmentScpJob.cpp:416
4203
4d42408da117 improving const-correctness in ParsedDicomFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4199
diff changeset
28 unreadVariable:../../OrthancFramework/Sources/FileStorage/StorageAccessor.cpp
4895
8f1f76b73499 fix RunCppCheck.sh for openssl 3.x
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4889
diff changeset
29 unreadVariable:../../OrthancServer/Sources/OrthancRestApi/OrthancRestModalities.cpp:1115
4207
116bd42caf49 Orthanc-1.7.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4206
diff changeset
30 unusedFunction
4858
8b51d65584f0 cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4744
diff changeset
31 useInitializationList:../../OrthancFramework/Sources/Images/PngReader.cpp:90
8b51d65584f0 cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4744
diff changeset
32 useInitializationList:../../OrthancFramework/Sources/Images/PngWriter.cpp:98
4895
8f1f76b73499 fix RunCppCheck.sh for openssl 3.x
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4889
diff changeset
33 useInitializationList:../../OrthancServer/Sources/ServerJobs/DicomModalityStoreJob.cpp:274
4985
c767035fff77 cppcheck
Alain Mazy <am@osimis.io>
parents: 4983
diff changeset
34 assertWithSideEffect:../../OrthancServer/Plugins/Engine/OrthancPluginDatabase.cpp:276
c767035fff77 cppcheck
Alain Mazy <am@osimis.io>
parents: 4983
diff changeset
35 assertWithSideEffect:../../OrthancServer/Plugins/Engine/OrthancPluginDatabase.cpp:1018
c767035fff77 cppcheck
Alain Mazy <am@osimis.io>
parents: 4983
diff changeset
36 assertWithSideEffect:../../OrthancServer/Sources/Database/Compatibility/DatabaseLookup.cpp:289
c767035fff77 cppcheck
Alain Mazy <am@osimis.io>
parents: 4983
diff changeset
37 assertWithSideEffect:../../OrthancServer/Sources/Database/Compatibility/DatabaseLookup.cpp:388
5109
027366cae766 cppcheck
Alain Mazy <am@osimis.io>
parents: 5050
diff changeset
38 assertWithSideEffect:../../OrthancServer/Sources/Database/StatelessDatabaseOperations.cpp:3490
4985
c767035fff77 cppcheck
Alain Mazy <am@osimis.io>
parents: 4983
diff changeset
39 assertWithSideEffect:../../OrthancServer/Sources/ServerJobs/ResourceModificationJob.cpp:241
4203
4d42408da117 improving const-correctness in ParsedDicomFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4199
diff changeset
40 EOF
4d42408da117 improving const-correctness in ParsedDicomFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4199
diff changeset
41
4199
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 ${CPPCHECK} --enable=all --quiet --std=c++11 \
4203
4d42408da117 improving const-correctness in ParsedDicomFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4199
diff changeset
43 --suppressions-list=/tmp/cppcheck-suppressions.txt \
4199
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 -DBOOST_HAS_DATE_TIME=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 -DBOOST_HAS_FILESYSTEM_V3=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 -DBOOST_HAS_REGEX=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 -DCIVETWEB_HAS_DISABLE_KEEP_ALIVE=1 \
4253
2221051b42df cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4223
diff changeset
48 -DCIVETWEB_HAS_WEBDAV_WRITING=1 \
4199
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 -DDCMTK_VERSION_NUMBER=365 \
4386
3ea753570c6d cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4356
diff changeset
50 -DHAVE_MALLOPT=1 \
4199
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 -DMONGOOSE_USE_CALLBACKS=1 \
4398
38c22715bb56 fix RunCppCheck.sh
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4386
diff changeset
52 -DJSONCPP_VERSION_MAJOR=1 \
38c22715bb56 fix RunCppCheck.sh
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4386
diff changeset
53 -DJSONCPP_VERSION_MINOR=0 \
4199
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 -DORTHANC_BUILDING_FRAMEWORK_LIBRARY=0 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 -DORTHANC_BUILDING_SERVER_LIBRARY=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 -DORTHANC_BUILD_UNIT_TESTS=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 -DORTHANC_ENABLE_BASE64=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 -DORTHANC_ENABLE_CIVETWEB=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 -DORTHANC_ENABLE_CURL=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 -DORTHANC_ENABLE_DCMTK=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 -DORTHANC_ENABLE_DCMTK_JPEG=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 -DORTHANC_ENABLE_DCMTK_JPEG_LOSSLESS=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 -DORTHANC_ENABLE_DCMTK_NETWORKING=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 -DORTHANC_ENABLE_DCMTK_TRANSCODING=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 -DORTHANC_ENABLE_JPEG=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66 -DORTHANC_ENABLE_LOCALE=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67 -DORTHANC_ENABLE_LOGGING=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68 -DORTHANC_ENABLE_LOGGING_STDIO=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69 -DORTHANC_ENABLE_LUA=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70 -DORTHANC_ENABLE_MD5=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71 -DORTHANC_ENABLE_MONGOOSE=0 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72 -DORTHANC_ENABLE_PKCS11=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
73 -DORTHANC_ENABLE_PLUGINS=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74 -DORTHANC_ENABLE_PNG=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75 -DORTHANC_ENABLE_PUGIXML=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
76 -DORTHANC_ENABLE_SQLITE=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77 -DORTHANC_ENABLE_SSL=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
78 -DORTHANC_ENABLE_ZLIB=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79 -DORTHANC_SANDBOXED=0 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
80 -DORTHANC_SQLITE_VERSION=3027001 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81 -DORTHANC_UNIT_TESTS_LINK_FRAMEWORK=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
82 -DPUGIXML_VERSION=150 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
83 -DUNIT_TESTS_WITH_HTTP_CONNEXIONS=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
84 -D__BYTE_ORDER=__LITTLE_ENDIAN \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
85 -D__GNUC__ \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
86 -D__cplusplus=201103 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87 -D__linux__ \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
88 -UNDEBUG \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
90 ../../OrthancFramework/Sources \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
91 ../../OrthancFramework/UnitTestsSources \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
92 ../../OrthancServer/Plugins/Engine \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
93 ../../OrthancServer/Plugins/Include \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
94 ../../OrthancServer/Sources \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
95 ../../OrthancServer/UnitTestsSources \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
96 \
4207
116bd42caf49 Orthanc-1.7.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4206
diff changeset
97 2>&1