changeset 4994:2f30aa99c2db

cppcheck
author Alain Mazy <am@osimis.io>
date Tue, 03 May 2022 15:30:01 +0200
parents 8feb00fea93d
children 01934fc29d43
files OrthancServer/Resources/RunCppCheck.sh OrthancServer/Sources/OrthancRestApi/OrthancRestResources.cpp OrthancServer/Sources/ServerContext.cpp
diffstat 3 files changed, 5 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancServer/Resources/RunCppCheck.sh	Mon May 02 14:31:41 2022 +0200
+++ b/OrthancServer/Resources/RunCppCheck.sh	Tue May 03 15:30:01 2022 +0200
@@ -35,7 +35,7 @@
 assertWithSideEffect:../../OrthancServer/Plugins/Engine/OrthancPluginDatabase.cpp:1018
 assertWithSideEffect:../../OrthancServer/Sources/Database/Compatibility/DatabaseLookup.cpp:289
 assertWithSideEffect:../../OrthancServer/Sources/Database/Compatibility/DatabaseLookup.cpp:388
-assertWithSideEffect:../../OrthancServer/Sources/Database/StatelessDatabaseOperations.cpp:3381
+assertWithSideEffect:../../OrthancServer/Sources/Database/StatelessDatabaseOperations.cpp:3386
 assertWithSideEffect:../../OrthancServer/Sources/ServerJobs/ResourceModificationJob.cpp:241
 EOF
 
--- a/OrthancServer/Sources/OrthancRestApi/OrthancRestResources.cpp	Mon May 02 14:31:41 2022 +0200
+++ b/OrthancServer/Sources/OrthancRestApi/OrthancRestResources.cpp	Tue May 03 15:30:01 2022 +0200
@@ -3388,7 +3388,7 @@
                        "'false' by default. (New in Orthanc 1.11.0)", false);
   }
 
-  bool GetReconstructFilesField(RestApiPostCall& call)
+  bool GetReconstructFilesField(const RestApiPostCall& call)
   {
     bool reconstructFiles = false;
     Json::Value request;
--- a/OrthancServer/Sources/ServerContext.cpp	Mon May 02 14:31:41 2022 +0200
+++ b/OrthancServer/Sources/ServerContext.cpp	Tue May 03 15:30:01 2022 +0200
@@ -638,8 +638,9 @@
         }
       }
 
-      if (!isReconstruct) // skip logs in case of reconstruction
+      if (!isReconstruct) 
       {
+        // skip logs in case of reconstruction
         switch (result.GetStatus())
         {
           case StoreStatus_Success:
@@ -658,10 +659,8 @@
             // This should never happen
             break;
         }
-      }
 
-      if (!isReconstruct) // skip all signals if this is a reconstruction
-      {
+        // skip all signals if this is a reconstruction
         if (result.GetStatus() == StoreStatus_Success ||
             result.GetStatus() == StoreStatus_AlreadyStored)
         {