changeset 4386:3ea753570c6d

cppcheck
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 18 Dec 2020 12:15:45 +0100
parents 92737070b301
children 7874f6960d7a 558de9ecd107
files OrthancServer/Resources/RunCppCheck.sh OrthancServer/Sources/OrthancWebDav.cpp
diffstat 2 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancServer/Resources/RunCppCheck.sh	Fri Dec 18 11:48:40 2020 +0100
+++ b/OrthancServer/Resources/RunCppCheck.sh	Fri Dec 18 12:15:45 2020 +0100
@@ -15,14 +15,14 @@
 nullPointer:../../OrthancFramework/UnitTestsSources/RestApiTests.cpp:318
 nullPointerRedundantCheck:../../OrthancFramework/UnitTestsSources/DicomMapTests.cpp
 stlFindInsert:../../OrthancFramework/Sources/DicomFormat/DicomMap.cpp:1163
-stlFindInsert:../../OrthancServer/Sources/OrthancWebDav.cpp:383
+stlFindInsert:../../OrthancServer/Sources/OrthancWebDav.cpp:384
 stlFindInsert:../../OrthancServer/Sources/ServerIndex.cpp:400
 syntaxError:../../OrthancFramework/Sources/SQLite/FunctionContext.h:50
 syntaxError:../../OrthancFramework/UnitTestsSources/ZipTests.cpp:130
 syntaxError:../../OrthancServer/UnitTestsSources/UnitTestsMain.cpp:319
 uninitMemberVar:../../OrthancServer/Sources/ServerJobs/StorageCommitmentScpJob.cpp:427
 unreadVariable:../../OrthancFramework/Sources/FileStorage/StorageAccessor.cpp
-unreadVariable:../../OrthancServer/Sources/OrthancRestApi/OrthancRestModalities.cpp:782
+unreadVariable:../../OrthancServer/Sources/OrthancRestApi/OrthancRestModalities.cpp:784
 unusedFunction
 useInitializationList:../../OrthancFramework/Sources/Images/PngReader.cpp:89
 useInitializationList:../../OrthancServer/Sources/ServerJobs/DicomModalityStoreJob.cpp:285
@@ -36,6 +36,7 @@
             -DCIVETWEB_HAS_DISABLE_KEEP_ALIVE=1 \
             -DCIVETWEB_HAS_WEBDAV_WRITING=1 \
             -DDCMTK_VERSION_NUMBER=365 \
+            -DHAVE_MALLOPT=1 \
             -DMONGOOSE_USE_CALLBACKS=1 \
             -DORTHANC_BUILDING_FRAMEWORK_LIBRARY=0 \
             -DORTHANC_BUILDING_SERVER_LIBRARY=1 \
--- a/OrthancServer/Sources/OrthancWebDav.cpp	Fri Dec 18 11:48:40 2020 +0100
+++ b/OrthancServer/Sources/OrthancWebDav.cpp	Fri Dec 18 12:15:45 2020 +0100
@@ -1274,16 +1274,16 @@
         // New in Orthanc 1.8.2
         std::unique_ptr<ZipReader> reader(ZipReader::CreateFromMemory(content));
 
-        std::string filename, content;
-        while (reader->ReadNextFile(filename, content))
+        std::string filename, uncompressedFile;
+        while (reader->ReadNextFile(filename, uncompressedFile))
         {
-          if (!content.empty())
+          if (!uncompressedFile.empty())
           {
             LOG(INFO) << "Uploading DICOM file extracted from a ZIP archive in WebDAV: " << filename;
           
             DicomInstanceToStore instance;
             instance.SetOrigin(DicomInstanceOrigin::FromWebDav());
-            instance.SetBuffer(content.c_str(), content.size());
+            instance.SetBuffer(uncompressedFile.c_str(), uncompressedFile.size());
 
             std::string publicId;