# HG changeset patch # User Alain Mazy # Date 1672938205 -3600 # Node ID 482f3e80ed0a5f8d5f52bea7d161a885b3d3e5d0 # Parent e107ff622e6dd0c89a7fe0a96f1f1371c550a927 cppcheck diff -r e107ff622e6d -r 482f3e80ed0a OrthancFramework/Sources/DicomParsing/DicomModification.cpp --- a/OrthancFramework/Sources/DicomParsing/DicomModification.cpp Thu Jan 05 17:25:21 2023 +0100 +++ b/OrthancFramework/Sources/DicomParsing/DicomModification.cpp Thu Jan 05 18:03:25 2023 +0100 @@ -929,10 +929,9 @@ throw OrthancException(ErrorCode_BadRequest); } - - // Sanity checks at the patient level if (!allowManualIdentifiers_) { + // Sanity checks at the patient level if (level_ == ResourceType_Patient && IsReplaced(DICOM_TAG_STUDY_INSTANCE_UID)) { throw OrthancException(ErrorCode_BadRequest, @@ -950,12 +949,8 @@ throw OrthancException(ErrorCode_BadRequest, "When modifying a patient, the SopInstanceUID cannot be manually modified"); } - } - - // Sanity checks at the study level - if (!allowManualIdentifiers_) - { + // Sanity checks at the study level if (level_ == ResourceType_Study && IsReplaced(DICOM_TAG_SERIES_INSTANCE_UID)) { throw OrthancException(ErrorCode_BadRequest, @@ -967,12 +962,8 @@ throw OrthancException(ErrorCode_BadRequest, "When modifying a study, the SopInstanceUID cannot be manually modified"); } - } - - // Sanity checks at the series level - if (!allowManualIdentifiers_) - { + // Sanity checks at the series level if (level_ == ResourceType_Series && IsReplaced(DICOM_TAG_SOP_INSTANCE_UID)) { throw OrthancException(ErrorCode_BadRequest, diff -r e107ff622e6d -r 482f3e80ed0a OrthancServer/Resources/RunCppCheck.sh --- a/OrthancServer/Resources/RunCppCheck.sh Thu Jan 05 17:25:21 2023 +0100 +++ b/OrthancServer/Resources/RunCppCheck.sh Thu Jan 05 18:03:25 2023 +0100 @@ -26,7 +26,7 @@ syntaxError:../../OrthancServer/UnitTestsSources/UnitTestsMain.cpp:310 uninitMemberVar:../../OrthancServer/Sources/ServerJobs/StorageCommitmentScpJob.cpp:416 unreadVariable:../../OrthancFramework/Sources/FileStorage/StorageAccessor.cpp -unreadVariable:../../OrthancServer/Sources/OrthancRestApi/OrthancRestModalities.cpp:1115 +unreadVariable:../../OrthancServer/Sources/OrthancRestApi/OrthancRestModalities.cpp:1118 unusedFunction useInitializationList:../../OrthancFramework/Sources/Images/PngReader.cpp:90 useInitializationList:../../OrthancFramework/Sources/Images/PngWriter.cpp:98