changeset 6805:91cb6f565e7d

cppcheck
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 19 May 2026 07:28:08 +0200
parents 4b8794c12e31
children 68d9bad29411
files OrthancFramework/Sources/FileStorage/MemoryStorageArea.cpp OrthancServer/Resources/RunCppCheck-2.17.1.sh OrthancServer/Resources/RunCppCheck-2.20.0.sh
diffstat 3 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancFramework/Sources/FileStorage/MemoryStorageArea.cpp	Mon May 18 20:56:08 2026 +0200
+++ b/OrthancFramework/Sources/FileStorage/MemoryStorageArea.cpp	Tue May 19 07:28:08 2026 +0200
@@ -117,7 +117,7 @@
       {
         std::string range;
         assert(size != 0);
-        range.assign(found->second->c_str() + start, size);
+        range.assign(reinterpret_cast<const char*>(found->second->c_str()) + start, size);
 
         return StringMemoryBuffer::CreateFromSwap(range);
       }
--- a/OrthancServer/Resources/RunCppCheck-2.17.1.sh	Mon May 18 20:56:08 2026 +0200
+++ b/OrthancServer/Resources/RunCppCheck-2.17.1.sh	Tue May 19 07:28:08 2026 +0200
@@ -17,11 +17,11 @@
 constParameterCallback:../../OrthancFramework/Sources/DicomNetworking/Internals/StoreScp.cpp:112
 constParameterCallback:../../OrthancFramework/Sources/DicomNetworking/Internals/StoreScp.cpp:113
 constParameterCallback:../../OrthancFramework/Sources/Pkcs11.cpp:125
-constParameterCallback:../../OrthancServer/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp:3545
+constParameterCallback:../../OrthancServer/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp:3553
 constParameterCallback:../../OrthancServer/Sources/OrthancGetRequestHandler.cpp:48
-constParameterPointer:../../OrthancFramework/Sources/Logging.cpp:448
-constParameterPointer:../../OrthancFramework/Sources/Logging.cpp:452
-constParameterPointer:../../OrthancFramework/Sources/Toolbox.cpp:3343
+constParameterPointer:../../OrthancFramework/Sources/Logging.cpp:450
+constParameterPointer:../../OrthancFramework/Sources/Logging.cpp:454
+constParameterPointer:../../OrthancFramework/Sources/Toolbox.cpp:3351
 knownConditionTrueFalse:../../OrthancFramework/Sources/DicomNetworking/Internals/CommandDispatcher.cpp:112
 knownConditionTrueFalse:../../OrthancFramework/Sources/DicomParsing/Internals/DicomImageDecoder.cpp:440
 knownConditionTrueFalse:../../OrthancFramework/Sources/Images/PamReader.cpp:204
@@ -45,7 +45,7 @@
 syntaxError:../../OrthancFramework/UnitTestsSources/DicomMapTests.cpp:74
 syntaxError:../../OrthancFramework/UnitTestsSources/ZipTests.cpp:133
 syntaxError:../../OrthancServer/UnitTestsSources/UnitTestsMain.cpp:325
-useInitializationList:../../OrthancFramework/Sources/Images/PngReader.cpp:97
+useInitializationList:../../OrthancFramework/Sources/Images/PngReader.cpp:99
 useInitializationList:../../OrthancFramework/Sources/Images/PngWriter.cpp:99
 useInitializationList:../../OrthancServer/Sources/ServerJobs/DicomModalityStoreJob.cpp:280
 variableScope:../../OrthancServer/Sources/OrthancRestApi/OrthancRestApi.cpp:230
--- a/OrthancServer/Resources/RunCppCheck-2.20.0.sh	Mon May 18 20:56:08 2026 +0200
+++ b/OrthancServer/Resources/RunCppCheck-2.20.0.sh	Tue May 19 07:28:08 2026 +0200
@@ -10,7 +10,7 @@
 fi
 
 cat <<EOF > /tmp/cppcheck-suppressions.txt
-assertWithSideEffect:../../OrthancFramework/Sources/DataSource/DataSourceReader.cpp:212
+assertWithSideEffect:../../OrthancFramework/Sources/DataSource/DataSourceReader.cpp:220
 assertWithSideEffect:../../OrthancServer/Sources/Database/Compatibility/DatabaseLookup.cpp:292
 assertWithSideEffect:../../OrthancServer/Sources/Database/Compatibility/DatabaseLookup.cpp:391
 assertWithSideEffect:../../OrthancServer/Sources/ServerJobs/ResourceModificationJob.cpp:287