changeset 4569:19ea4ecd6d9a db-changes

cppcheck
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 08 Mar 2021 15:13:25 +0100
parents a3e6aa2b07b0
children 648defffc8cc
files OrthancServer/Sources/ServerIndex.cpp
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancServer/Sources/ServerIndex.cpp	Mon Mar 08 15:00:58 2021 +0100
+++ b/OrthancServer/Sources/ServerIndex.cpp	Mon Mar 08 15:13:25 2021 +0100
@@ -3252,7 +3252,8 @@
       GlobalProperty sequence_;
 
     public:
-      Operations(GlobalProperty sequence) :
+      explicit Operations(GlobalProperty sequence) :
+        newValue_(0),  // Dummy initialization
         sequence_(sequence)
       {
       }
@@ -3296,6 +3297,7 @@
 
     Operations operations(sequence);
     Apply(operations);
+    assert(operations.GetNewValue() != 0);
     return operations.GetNewValue();
   }