# HG changeset patch # User Alain Mazy # Date 1763010643 -3600 # Node ID 18a70fb61b91a2a711d8119da303c2898514a09c # Parent 55db426a8667ac4dbe4cd404fab338532ec83877 cppcheck: passedByValue, constParameterPointer, constVariablePointer diff -r 55db426a8667 -r 18a70fb61b91 OrthancFramework/Sources/DicomNetworking/Internals/CommandDispatcher.cpp --- a/OrthancFramework/Sources/DicomNetworking/Internals/CommandDispatcher.cpp Wed Nov 12 18:02:18 2025 +0100 +++ b/OrthancFramework/Sources/DicomNetworking/Internals/CommandDispatcher.cpp Thu Nov 13 06:10:43 2025 +0100 @@ -141,7 +141,7 @@ T_ASC_SC_ROLE acceptedRole) { int n, i, k; - DUL_PRESENTATIONCONTEXT *dpc; + const DUL_PRESENTATIONCONTEXT *dpc; T_ASC_PresentationContext pc; n = ASC_countPresentationContexts(params); diff -r 55db426a8667 -r 18a70fb61b91 OrthancFramework/Sources/DicomParsing/Internals/DicomImageDecoder.cpp --- a/OrthancFramework/Sources/DicomParsing/Internals/DicomImageDecoder.cpp Wed Nov 12 18:02:18 2025 +0100 +++ b/OrthancFramework/Sources/DicomParsing/Internals/DicomImageDecoder.cpp Thu Nov 13 06:10:43 2025 +0100 @@ -275,10 +275,10 @@ else if (DecodePsmctRle1(psmct_, dataset)) { LOG(INFO) << "The PMSCT_RLE1 decoding has succeeded"; - Uint8* pixData = NULL; + const Uint8* pixData = NULL; if (psmct_.size() > 0) { - pixData = reinterpret_cast(&psmct_[0]); + pixData = reinterpret_cast(&psmct_[0]); } slowAccessor_.reset(new DicomIntegerPixelAccessor(m, pixData, psmct_.size())); diff -r 55db426a8667 -r 18a70fb61b91 OrthancFramework/Sources/Images/ImageProcessing.cpp --- a/OrthancFramework/Sources/Images/ImageProcessing.cpp Wed Nov 12 18:02:18 2025 +0100 +++ b/OrthancFramework/Sources/Images/ImageProcessing.cpp Thu Nov 13 06:10:43 2025 +0100 @@ -1224,7 +1224,7 @@ for (unsigned int y = 0; y < height; y++) { uint8_t* q = reinterpret_cast(image.GetRow(y)); - uint8_t* a = reinterpret_cast(alpha.GetRow(y)); + const uint8_t* a = reinterpret_cast(alpha.GetRow(y)); for (unsigned int x = 0; x < width; x++) { diff -r 55db426a8667 -r 18a70fb61b91 OrthancServer/Plugins/Engine/OrthancPlugins.cpp --- a/OrthancServer/Plugins/Engine/OrthancPlugins.cpp Wed Nov 12 18:02:18 2025 +0100 +++ b/OrthancServer/Plugins/Engine/OrthancPlugins.cpp Thu Nov 13 06:10:43 2025 +0100 @@ -2547,7 +2547,7 @@ } - static std::string GetAllowedMethods(_OrthancPluginChunkedRestCallback parameters) + static std::string GetAllowedMethods(const _OrthancPluginChunkedRestCallback& parameters) { std::string s; diff -r 55db426a8667 -r 18a70fb61b91 OrthancServer/Resources/RunCppCheck.sh --- a/OrthancServer/Resources/RunCppCheck.sh Wed Nov 12 18:02:18 2025 +0100 +++ b/OrthancServer/Resources/RunCppCheck.sh Thu Nov 13 06:10:43 2025 +0100 @@ -66,6 +66,7 @@ throwInNoexceptFunction:../../OrthancServer/Plugins/Samples/Common/OrthancPluginCppWrapper.h:496 rethrowNoCurrentException:../../OrthancFramework/UnitTestsSources/FromDcmtkTests.cpp rethrowNoCurrentException:../../OrthancFramework/UnitTestsSources/RestApiTests.cpp +constParameterPointer:../../OrthancFramework/Sources/Toolbox.cpp:3046 EOF # TODO: re-enable nullPointerOutOfMemory