# HG changeset patch # User Alain Mazy # Date 1762949236 -3600 # Node ID ce6f5d416db1b4df281266a4c2882f56c63885ee # Parent abdfbc4e05df21df502be936fffb965e2dc18be5 cppcheck: unreadVariable diff -r abdfbc4e05df -r ce6f5d416db1 OrthancFramework/Sources/JobsEngine/JobsRegistry.cpp --- a/OrthancFramework/Sources/JobsEngine/JobsRegistry.cpp Wed Nov 12 13:01:06 2025 +0100 +++ b/OrthancFramework/Sources/JobsEngine/JobsRegistry.cpp Wed Nov 12 13:07:16 2025 +0100 @@ -918,12 +918,7 @@ { // Success, try and retrieve the status of the job JobsIndex::const_iterator it = jobsIndex_.find(id); - if (it == jobsIndex_.end()) - { - // Should not happen - state = JobState_Failure; - } - else + if (it != jobsIndex_.end()) { const JobStatus& status = it->second->GetLastStatus(); successContent = status.GetPublicContent(); diff -r abdfbc4e05df -r ce6f5d416db1 OrthancServer/Resources/RunCppCheck.sh --- a/OrthancServer/Resources/RunCppCheck.sh Wed Nov 12 13:01:06 2025 +0100 +++ b/OrthancServer/Resources/RunCppCheck.sh Wed Nov 12 13:07:16 2025 +0100 @@ -26,8 +26,6 @@ syntaxError:../../OrthancFramework/UnitTestsSources/ZipTests.cpp:133 syntaxError:../../OrthancServer/UnitTestsSources/UnitTestsMain.cpp:325 uninitMemberVar:../../OrthancServer/Sources/ServerJobs/StorageCommitmentScpJob.cpp:419 -unreadVariable:../../OrthancFramework/Sources/FileStorage/StorageAccessor.cpp -unreadVariable:../../OrthancServer/Sources/OrthancRestApi/OrthancRestModalities.cpp:1173 unusedFunction useInitializationList:../../OrthancFramework/Sources/Images/PngReader.cpp:91 useInitializationList:../../OrthancFramework/Sources/Images/PngWriter.cpp:99 @@ -67,7 +65,6 @@ throwInNoexceptFunction:../../OrthancServer/Plugins/Samples/Common/OrthancPluginCppWrapper.h:218 throwInNoexceptFunction:../../OrthancServer/Plugins/Samples/Common/OrthancPluginCppWrapper.h:376 throwInNoexceptFunction:../../OrthancServer/Plugins/Samples/Common/OrthancPluginCppWrapper.h:496 - EOF # TODO: re-enable nullPointerOutOfMemory