changeset 6429:2d5910d39c47

renamed RunCppCheck.sh as RunCppCheck-2.17.1.sh
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 18 Nov 2025 15:28:09 +0100
parents 55e1cbf851ab
children 81f8bfc1a700
files OrthancServer/Resources/RunCppCheck-2.1.sh OrthancServer/Resources/RunCppCheck-2.17.0.sh OrthancServer/Resources/RunCppCheck-2.17.1.sh OrthancServer/Resources/RunCppCheck.sh
diffstat 4 files changed, 138 insertions(+), 136 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancServer/Resources/RunCppCheck-2.1.sh	Tue Nov 18 14:52:10 2025 +0100
+++ b/OrthancServer/Resources/RunCppCheck-2.1.sh	Tue Nov 18 15:28:09 2025 +0100
@@ -1,4 +1,5 @@
 #!/bin/bash
+# Note: This script is tuned to run with cppcheck v2.1
 
 set -ex
 
@@ -25,7 +26,6 @@
 syntaxError:../../OrthancFramework/UnitTestsSources/DicomMapTests.cpp:74
 syntaxError:../../OrthancFramework/UnitTestsSources/ZipTests.cpp:133
 syntaxError:../../OrthancServer/UnitTestsSources/UnitTestsMain.cpp:325
-uninitMemberVar:../../OrthancServer/Sources/ServerJobs/StorageCommitmentScpJob.cpp:417
 unreadVariable:../../OrthancFramework/Sources/FileStorage/StorageAccessor.cpp
 unreadVariable:../../OrthancServer/Sources/OrthancRestApi/OrthancRestModalities.cpp:1173
 unusedFunction
--- a/OrthancServer/Resources/RunCppCheck-2.17.0.sh	Tue Nov 18 14:52:10 2025 +0100
+++ b/OrthancServer/Resources/RunCppCheck-2.17.0.sh	Tue Nov 18 15:28:09 2025 +0100
@@ -1,4 +1,5 @@
 #!/bin/bash
+# Note: This script is tuned to run with cppcheck v2.17.0
 
 set -ex
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/OrthancServer/Resources/RunCppCheck-2.17.1.sh	Tue Nov 18 15:28:09 2025 +0100
@@ -0,0 +1,136 @@
+#!/bin/bash
+# Note: This script is tuned to run with cppcheck v2.17.1
+
+set -ex
+
+CPPCHECK=cppcheck
+
+if [ $# -ge 1 ]; then
+    CPPCHECK=$1
+fi
+
+cat <<EOF > /tmp/cppcheck-suppressions.txt
+knownConditionTrueFalse:../../OrthancServer/Plugins/Engine/OrthancPlugins.cpp
+nullPointer:../../OrthancFramework/UnitTestsSources/RestApiTests.cpp:322
+stlFindInsert:../../OrthancFramework/Sources/DicomFormat/DicomMap.cpp:1525
+stlFindInsert:../../OrthancFramework/Sources/RestApi/RestApiCallDocumentation.cpp:166
+stlFindInsert:../../OrthancFramework/Sources/RestApi/RestApiCallDocumentation.cpp:74
+syntaxError:../../OrthancFramework/Sources/SQLite/FunctionContext.h:53
+syntaxError:../../OrthancFramework/UnitTestsSources/DicomMapTests.cpp:74
+syntaxError:../../OrthancFramework/UnitTestsSources/ZipTests.cpp:133
+syntaxError:../../OrthancServer/UnitTestsSources/UnitTestsMain.cpp:325
+uninitMemberVar:../../OrthancServer/Sources/ServerJobs/StorageCommitmentScpJob.cpp:419
+useInitializationList:../../OrthancFramework/Sources/Images/PngReader.cpp:91
+useInitializationList:../../OrthancFramework/Sources/Images/PngWriter.cpp:99
+useInitializationList:../../OrthancServer/Sources/ServerJobs/DicomModalityStoreJob.cpp:275
+assertWithSideEffect:../../OrthancServer/Sources/Database/Compatibility/DatabaseLookup.cpp:292
+assertWithSideEffect:../../OrthancServer/Sources/Database/Compatibility/DatabaseLookup.cpp:391
+assertWithSideEffect:../../OrthancServer/Sources/ServerJobs/ResourceModificationJob.cpp:286
+variableScope:../../OrthancServer/Sources/OrthancRestApi/OrthancRestApi.cpp:228
+variableScope:../../OrthancServer/Sources/ServerJobs/OrthancPeerStoreJob.cpp:94
+uselessOverride:../../OrthancFramework/Sources/MultiThreading/IRunnableBySteps.h:35
+uselessOverride:../../OrthancFramework/Sources/JobsEngine/SetOfInstancesJob.h:76
+cstyleCast:../../OrthancServer/Plugins/Engine/PluginsManager.cpp:85
+cstyleCast:../../OrthancServer/Plugins/Engine/PluginsManager.cpp:108
+cstyleCast:../../OrthancServer/Plugins/Engine/PluginsManager.cpp:124
+cstyleCast:../../OrthancServer/Plugins/Engine/PluginsManager.cpp:140
+constParameterPointer:../../OrthancServer/Plugins/Include/orthanc/OrthancCPlugin.h
+constParameterPointer:../../OrthancFramework/Sources/Logging.cpp:447
+constParameterPointer:../../OrthancFramework/Sources/Logging.cpp:451
+constParameterPointer:../../OrthancFramework/Sources/Toolbox.cpp:3053
+knownConditionTrueFalse:../../OrthancFramework/Sources/DicomNetworking/Internals/CommandDispatcher.cpp:114
+knownConditionTrueFalse:../../OrthancFramework/Sources/DicomParsing/Internals/DicomImageDecoder.cpp:425
+knownConditionTrueFalse:../../OrthancFramework/Sources/JobsEngine/Operations/SequenceOfOperationsJob.cpp:345
+throwInNoexceptFunction:../../OrthancFramework/Sources/Cache/MemoryStringCache.cpp:121
+throwInNoexceptFunction:../../OrthancFramework/Sources/Cache/MemoryCache.cpp:91
+throwInNoexceptFunction:../../OrthancFramework/Sources/Cache/MemoryObjectCache.cpp:99
+throwInNoexceptFunction:../../OrthancFramework/Sources/MallocMemoryBuffer.h:50
+throwInNoexceptFunction:../../OrthancFramework/Sources/MetricsRegistry.cpp:620
+throwInNoexceptFunction:../../OrthancFramework/Sources/MetricsRegistry.cpp:632
+throwInNoexceptFunction:../../OrthancFramework/Sources/MetricsRegistry.cpp:676
+throwInNoexceptFunction:../../OrthancFramework/Sources/JobsEngine/JobsRegistry.cpp:1296
+throwInNoexceptFunction:../../OrthancServer/Sources/LuaScripting.cpp:830
+throwInNoexceptFunction:../../OrthancServer/Sources/StorageCommitmentReports.cpp:187
+throwInNoexceptFunction:../../OrthancServer/Plugins/Samples/Common/OrthancPluginCppWrapper.h:218
+throwInNoexceptFunction:../../OrthancServer/Plugins/Samples/Common/OrthancPluginCppWrapper.h:376
+throwInNoexceptFunction:../../OrthancServer/Plugins/Samples/Common/OrthancPluginCppWrapper.h:496
+rethrowNoCurrentException:../../OrthancFramework/UnitTestsSources/FromDcmtkTests.cpp
+rethrowNoCurrentException:../../OrthancFramework/UnitTestsSources/RestApiTests.cpp
+constParameterPointer:../../OrthancFramework/Sources/Toolbox.cpp:3046
+constParameterCallback:../../OrthancServer/Sources/OrthancGetRequestHandler.cpp
+constParameterCallback:../../OrthancFramework/Sources/DicomNetworking/DicomStoreUserConnection.cpp
+constParameterCallback:../../OrthancFramework/Sources/DicomNetworking/Internals/StoreScp.cpp
+constParameterCallback:../../OrthancFramework/Sources/Pkcs11.cpp
+constParameterCallback:../../OrthancServer/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp:3449
+unknownMacro:../../OrthancFramework/Sources/DicomParsing/DicomModification.cpp:39
+EOF
+
+
+${CPPCHECK} -j 8 --enable=all --quiet --std=c++11 \
+            --suppress=missingIncludeSystem \
+            --suppress=missingInclude \
+            --suppress=useStlAlgorithm \
+            --check-level=exhaustive \
+            --suppressions-list=/tmp/cppcheck-suppressions.txt \
+            -DBOOST_HAS_DATE_TIME=1 \
+            -DBOOST_HAS_FILESYSTEM_V3=1 \
+            -DBOOST_HAS_REGEX=1 \
+            -DCIVETWEB_HAS_DISABLE_KEEP_ALIVE=1 \
+            -DCIVETWEB_HAS_WEBDAV_WRITING=1 \
+            -DDCMTK_VERSION_NUMBER=365 \
+            -DHAVE_MALLOPT=1 \
+            -DHAVE_MALLOC_TRIM=1 \
+            -DMONGOOSE_USE_CALLBACKS=1 \
+            -DJSONCPP_VERSION_MAJOR=1 \
+            -DJSONCPP_VERSION_MINOR=0 \
+            -DORTHANC_BUILDING_FRAMEWORK_LIBRARY=0 \
+            -DORTHANC_BUILD_UNIT_TESTS=1 \
+            -DORTHANC_ENABLE_BASE64=1 \
+            -DORTHANC_ENABLE_CIVETWEB=1 \
+            -DORTHANC_ENABLE_CURL=1 \
+            -DORTHANC_ENABLE_DCMTK=1 \
+            -DORTHANC_ENABLE_DCMTK_JPEG=1 \
+            -DORTHANC_ENABLE_DCMTK_JPEG_LOSSLESS=1 \
+            -DORTHANC_ENABLE_DCMTK_NETWORKING=1 \
+            -DORTHANC_ENABLE_DCMTK_TRANSCODING=1 \
+            -DORTHANC_ENABLE_JPEG=1 \
+            -DORTHANC_ENABLE_LOCALE=1 \
+            -DORTHANC_ENABLE_LOGGING=1 \
+            -DORTHANC_ENABLE_LOGGING_STDIO=1 \
+            -DORTHANC_ENABLE_LUA=1 \
+            -DORTHANC_ENABLE_MD5=1 \
+            -DORTHANC_ENABLE_MONGOOSE=0 \
+            -DORTHANC_ENABLE_PKCS11=1 \
+            -DORTHANC_ENABLE_PLUGINS=1 \
+            -DORTHANC_ENABLE_PNG=1 \
+            -DORTHANC_ENABLE_PUGIXML=1 \
+            -DORTHANC_ENABLE_SQLITE=1 \
+            -DORTHANC_ENABLE_SSL=1 \
+            -DORTHANC_ENABLE_ZLIB=1 \
+            -DORTHANC_SANDBOXED=0 \
+            -DORTHANC_SQLITE_VERSION=3027001 \
+            -DORTHANC_UNIT_TESTS_LINK_FRAMEWORK=1 \
+            -DPUGIXML_VERSION=150 \
+            -DUNIT_TESTS_WITH_HTTP_CONNEXIONS=1 \
+            -D__BYTE_ORDER=__LITTLE_ENDIAN \
+            -D__GNUC__ \
+            -D__cplusplus=201103 \
+            -D__linux__ \
+            -UNDEBUG \
+            -DHAS_ORTHANC_EXCEPTION=1 \
+            \
+            ../../OrthancFramework/Sources \
+            ../../OrthancFramework/UnitTestsSources \
+            ../../OrthancServer/Plugins/Engine \
+            ../../OrthancServer/Plugins/Include \
+            ../../OrthancServer/Sources \
+            ../../OrthancServer/UnitTestsSources \
+            ../../OrthancServer/Plugins/Samples/Common \
+            ../../OrthancServer/Plugins/Samples/ConnectivityChecks \
+            ../../OrthancServer/Plugins/Samples/DelayedDeletion \
+            ../../OrthancServer/Plugins/Samples/Housekeeper \
+            ../../OrthancServer/Plugins/Samples/ModalityWorklists \
+            ../../OrthancServer/Plugins/Samples/MultitenantDicom \
+            ../../OrthancServer/Plugins/Samples/AdoptDicomInstance \
+            \
+            2>&1
--- a/OrthancServer/Resources/RunCppCheck.sh	Tue Nov 18 14:52:10 2025 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,135 +0,0 @@
-#!/bin/bash
-# note: this script was last tuned to run with cppcheck v2.17.1
-set -ex
-
-CPPCHECK=cppcheck
-
-if [ $# -ge 1 ]; then
-    CPPCHECK=$1
-fi
-
-cat <<EOF > /tmp/cppcheck-suppressions.txt
-knownConditionTrueFalse:../../OrthancServer/Plugins/Engine/OrthancPlugins.cpp
-nullPointer:../../OrthancFramework/UnitTestsSources/RestApiTests.cpp:322
-stlFindInsert:../../OrthancFramework/Sources/DicomFormat/DicomMap.cpp:1525
-stlFindInsert:../../OrthancFramework/Sources/RestApi/RestApiCallDocumentation.cpp:166
-stlFindInsert:../../OrthancFramework/Sources/RestApi/RestApiCallDocumentation.cpp:74
-syntaxError:../../OrthancFramework/Sources/SQLite/FunctionContext.h:53
-syntaxError:../../OrthancFramework/UnitTestsSources/DicomMapTests.cpp:74
-syntaxError:../../OrthancFramework/UnitTestsSources/ZipTests.cpp:133
-syntaxError:../../OrthancServer/UnitTestsSources/UnitTestsMain.cpp:325
-uninitMemberVar:../../OrthancServer/Sources/ServerJobs/StorageCommitmentScpJob.cpp:419
-useInitializationList:../../OrthancFramework/Sources/Images/PngReader.cpp:91
-useInitializationList:../../OrthancFramework/Sources/Images/PngWriter.cpp:99
-useInitializationList:../../OrthancServer/Sources/ServerJobs/DicomModalityStoreJob.cpp:275
-assertWithSideEffect:../../OrthancServer/Sources/Database/Compatibility/DatabaseLookup.cpp:292
-assertWithSideEffect:../../OrthancServer/Sources/Database/Compatibility/DatabaseLookup.cpp:391
-assertWithSideEffect:../../OrthancServer/Sources/ServerJobs/ResourceModificationJob.cpp:286
-variableScope:../../OrthancServer/Sources/OrthancRestApi/OrthancRestApi.cpp:228
-variableScope:../../OrthancServer/Sources/ServerJobs/OrthancPeerStoreJob.cpp:94
-uselessOverride:../../OrthancFramework/Sources/MultiThreading/IRunnableBySteps.h:35
-uselessOverride:../../OrthancFramework/Sources/JobsEngine/SetOfInstancesJob.h:76
-cstyleCast:../../OrthancServer/Plugins/Engine/PluginsManager.cpp:85
-cstyleCast:../../OrthancServer/Plugins/Engine/PluginsManager.cpp:108
-cstyleCast:../../OrthancServer/Plugins/Engine/PluginsManager.cpp:124
-cstyleCast:../../OrthancServer/Plugins/Engine/PluginsManager.cpp:140
-constParameterPointer:../../OrthancServer/Plugins/Include/orthanc/OrthancCPlugin.h
-constParameterPointer:../../OrthancFramework/Sources/Logging.cpp:447
-constParameterPointer:../../OrthancFramework/Sources/Logging.cpp:451
-constParameterPointer:../../OrthancFramework/Sources/Toolbox.cpp:3053
-knownConditionTrueFalse:../../OrthancFramework/Sources/DicomNetworking/Internals/CommandDispatcher.cpp:114
-knownConditionTrueFalse:../../OrthancFramework/Sources/DicomParsing/Internals/DicomImageDecoder.cpp:425
-knownConditionTrueFalse:../../OrthancFramework/Sources/JobsEngine/Operations/SequenceOfOperationsJob.cpp:345
-throwInNoexceptFunction:../../OrthancFramework/Sources/Cache/MemoryStringCache.cpp:121
-throwInNoexceptFunction:../../OrthancFramework/Sources/Cache/MemoryCache.cpp:91
-throwInNoexceptFunction:../../OrthancFramework/Sources/Cache/MemoryObjectCache.cpp:99
-throwInNoexceptFunction:../../OrthancFramework/Sources/MallocMemoryBuffer.h:50
-throwInNoexceptFunction:../../OrthancFramework/Sources/MetricsRegistry.cpp:620
-throwInNoexceptFunction:../../OrthancFramework/Sources/MetricsRegistry.cpp:632
-throwInNoexceptFunction:../../OrthancFramework/Sources/MetricsRegistry.cpp:676
-throwInNoexceptFunction:../../OrthancFramework/Sources/JobsEngine/JobsRegistry.cpp:1296
-throwInNoexceptFunction:../../OrthancServer/Sources/LuaScripting.cpp:830
-throwInNoexceptFunction:../../OrthancServer/Sources/StorageCommitmentReports.cpp:187
-throwInNoexceptFunction:../../OrthancServer/Plugins/Samples/Common/OrthancPluginCppWrapper.h:218
-throwInNoexceptFunction:../../OrthancServer/Plugins/Samples/Common/OrthancPluginCppWrapper.h:376
-throwInNoexceptFunction:../../OrthancServer/Plugins/Samples/Common/OrthancPluginCppWrapper.h:496
-rethrowNoCurrentException:../../OrthancFramework/UnitTestsSources/FromDcmtkTests.cpp
-rethrowNoCurrentException:../../OrthancFramework/UnitTestsSources/RestApiTests.cpp
-constParameterPointer:../../OrthancFramework/Sources/Toolbox.cpp:3046
-constParameterCallback:../../OrthancServer/Sources/OrthancGetRequestHandler.cpp
-constParameterCallback:../../OrthancFramework/Sources/DicomNetworking/DicomStoreUserConnection.cpp
-constParameterCallback:../../OrthancFramework/Sources/DicomNetworking/Internals/StoreScp.cpp
-constParameterCallback:../../OrthancFramework/Sources/Pkcs11.cpp
-constParameterCallback:../../OrthancServer/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp:3449
-unknownMacro:../../OrthancFramework/Sources/DicomParsing/DicomModification.cpp:39
-EOF
-
-
-${CPPCHECK} -j 8 --enable=all --quiet --std=c++11 \
-            --suppress=missingIncludeSystem \
-            --suppress=missingInclude \
-            --suppress=useStlAlgorithm \
-            --check-level=exhaustive \
-            --suppressions-list=/tmp/cppcheck-suppressions.txt \
-            -DBOOST_HAS_DATE_TIME=1 \
-            -DBOOST_HAS_FILESYSTEM_V3=1 \
-            -DBOOST_HAS_REGEX=1 \
-            -DCIVETWEB_HAS_DISABLE_KEEP_ALIVE=1 \
-            -DCIVETWEB_HAS_WEBDAV_WRITING=1 \
-            -DDCMTK_VERSION_NUMBER=365 \
-            -DHAVE_MALLOPT=1 \
-            -DHAVE_MALLOC_TRIM=1 \
-            -DMONGOOSE_USE_CALLBACKS=1 \
-            -DJSONCPP_VERSION_MAJOR=1 \
-            -DJSONCPP_VERSION_MINOR=0 \
-            -DORTHANC_BUILDING_FRAMEWORK_LIBRARY=0 \
-            -DORTHANC_BUILD_UNIT_TESTS=1 \
-            -DORTHANC_ENABLE_BASE64=1 \
-            -DORTHANC_ENABLE_CIVETWEB=1 \
-            -DORTHANC_ENABLE_CURL=1 \
-            -DORTHANC_ENABLE_DCMTK=1 \
-            -DORTHANC_ENABLE_DCMTK_JPEG=1 \
-            -DORTHANC_ENABLE_DCMTK_JPEG_LOSSLESS=1 \
-            -DORTHANC_ENABLE_DCMTK_NETWORKING=1 \
-            -DORTHANC_ENABLE_DCMTK_TRANSCODING=1 \
-            -DORTHANC_ENABLE_JPEG=1 \
-            -DORTHANC_ENABLE_LOCALE=1 \
-            -DORTHANC_ENABLE_LOGGING=1 \
-            -DORTHANC_ENABLE_LOGGING_STDIO=1 \
-            -DORTHANC_ENABLE_LUA=1 \
-            -DORTHANC_ENABLE_MD5=1 \
-            -DORTHANC_ENABLE_MONGOOSE=0 \
-            -DORTHANC_ENABLE_PKCS11=1 \
-            -DORTHANC_ENABLE_PLUGINS=1 \
-            -DORTHANC_ENABLE_PNG=1 \
-            -DORTHANC_ENABLE_PUGIXML=1 \
-            -DORTHANC_ENABLE_SQLITE=1 \
-            -DORTHANC_ENABLE_SSL=1 \
-            -DORTHANC_ENABLE_ZLIB=1 \
-            -DORTHANC_SANDBOXED=0 \
-            -DORTHANC_SQLITE_VERSION=3027001 \
-            -DORTHANC_UNIT_TESTS_LINK_FRAMEWORK=1 \
-            -DPUGIXML_VERSION=150 \
-            -DUNIT_TESTS_WITH_HTTP_CONNEXIONS=1 \
-            -D__BYTE_ORDER=__LITTLE_ENDIAN \
-            -D__GNUC__ \
-            -D__cplusplus=201103 \
-            -D__linux__ \
-            -UNDEBUG \
-            -DHAS_ORTHANC_EXCEPTION=1 \
-            \
-            ../../OrthancFramework/Sources \
-            ../../OrthancFramework/UnitTestsSources \
-            ../../OrthancServer/Plugins/Engine \
-            ../../OrthancServer/Plugins/Include \
-            ../../OrthancServer/Sources \
-            ../../OrthancServer/UnitTestsSources \
-            ../../OrthancServer/Plugins/Samples/Common \
-            ../../OrthancServer/Plugins/Samples/ConnectivityChecks \
-            ../../OrthancServer/Plugins/Samples/DelayedDeletion \
-            ../../OrthancServer/Plugins/Samples/Housekeeper \
-            ../../OrthancServer/Plugins/Samples/ModalityWorklists \
-            ../../OrthancServer/Plugins/Samples/MultitenantDicom \
-            ../../OrthancServer/Plugins/Samples/AdoptDicomInstance \
-            \
-            2>&1