# HG changeset patch # User Sebastien Jodogne # Date 1648032527 -3600 # Node ID 964bbf5cb365ba2cfbb730af62a00a2d082d6957 # Parent 1610e56cadfb5a249ae5648104a163c963961710 cppcheck diff -r 1610e56cadfb -r 964bbf5cb365 OrthancFramework/Sources/DicomParsing/ParsedDicomFile.cpp --- a/OrthancFramework/Sources/DicomParsing/ParsedDicomFile.cpp Wed Mar 23 11:44:40 2022 +0100 +++ b/OrthancFramework/Sources/DicomParsing/ParsedDicomFile.cpp Wed Mar 23 11:48:47 2022 +0100 @@ -1962,7 +1962,7 @@ Uint16 rows, columns, bitsAllocated, bitPosition; const Sint16* origin = NULL; unsigned long originSize = 0; - DcmElement* overlay = NULL; + DcmElement* overlayElement = NULL; Uint8* overlayData = NULL; if (dataset.findAndGetUint16(DcmTagKey(group, 0x0010), rows).good() && @@ -1974,9 +1974,9 @@ bitsAllocated == 1 && dataset.findAndGetUint16(DcmTagKey(group, 0x0102), bitPosition).good() && bitPosition == 0 && - dataset.findAndGetElement(DcmTagKey(group, 0x3000), overlay).good() && - overlay != NULL && - overlay->getUint8Array(overlayData).good() && + dataset.findAndGetElement(DcmTagKey(group, 0x3000), overlayElement).good() && + overlayElement != NULL && + overlayElement->getUint8Array(overlayData).good() && overlayData != NULL) { /** @@ -1992,7 +1992,7 @@ **/ unsigned int expectedSize = Ceiling(rows * columns, 8); - if (overlay->getLengthField() < expectedSize) + if (overlayElement->getLengthField() < expectedSize) { throw OrthancException(ErrorCode_CorruptedFile, "Overlay doesn't have a valid number of bits"); } diff -r 1610e56cadfb -r 964bbf5cb365 OrthancServer/Plugins/Engine/OrthancPlugins.cpp --- a/OrthancServer/Plugins/Engine/OrthancPlugins.cpp Wed Mar 23 11:44:40 2022 +0100 +++ b/OrthancServer/Plugins/Engine/OrthancPlugins.cpp Wed Mar 23 11:48:47 2022 +0100 @@ -95,7 +95,7 @@ std::vector items_; public: - PathHelper(const std::vector& path) + explicit PathHelper(const std::vector& path) { items_.resize(path.size()); for (size_t i = 0; i < path.size(); i++)