changeset 4716:758fe3ffb336

cppcheck
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 23 Jun 2021 16:22:58 +0200
parents fb98db281d1d
children 783f8a048035 88d16656b8b5
files OrthancServer/Resources/RunCppCheck.sh OrthancServer/Sources/OrthancRestApi/OrthancRestResources.cpp
diffstat 2 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancServer/Resources/RunCppCheck.sh	Wed Jun 23 16:02:29 2021 +0200
+++ b/OrthancServer/Resources/RunCppCheck.sh	Wed Jun 23 16:22:58 2021 +0200
@@ -19,12 +19,14 @@
 stlFindInsert:../../OrthancFramework/Sources/RestApi/RestApiCallDocumentation.cpp:72
 stlFindInsert:../../OrthancServer/Sources/Database/StatelessDatabaseOperations.cpp:384
 stlFindInsert:../../OrthancServer/Sources/OrthancWebDav.cpp:386
+stlFindInsert:../../OrthancServer/Sources/ServerJobs/MergeStudyJob.cpp:51
+stlFindInsert:../../OrthancServer/Sources/ServerJobs/SplitStudyJob.cpp:201
 syntaxError:../../OrthancFramework/Sources/SQLite/FunctionContext.h:50
 syntaxError:../../OrthancFramework/UnitTestsSources/ZipTests.cpp:131
 syntaxError:../../OrthancServer/UnitTestsSources/UnitTestsMain.cpp:321
 uninitMemberVar:../../OrthancServer/Sources/ServerJobs/StorageCommitmentScpJob.cpp:427
 unreadVariable:../../OrthancFramework/Sources/FileStorage/StorageAccessor.cpp
-unreadVariable:../../OrthancServer/Sources/OrthancRestApi/OrthancRestModalities.cpp:1121
+unreadVariable:../../OrthancServer/Sources/OrthancRestApi/OrthancRestModalities.cpp:1123
 unusedFunction
 useInitializationList:../../OrthancFramework/Sources/Images/PngReader.cpp:89
 useInitializationList:../../OrthancFramework/Sources/Images/PngWriter.cpp:97
--- a/OrthancServer/Sources/OrthancRestApi/OrthancRestResources.cpp	Wed Jun 23 16:02:29 2021 +0200
+++ b/OrthancServer/Sources/OrthancRestApi/OrthancRestResources.cpp	Wed Jun 23 16:22:58 2021 +0200
@@ -2547,7 +2547,7 @@
       DicomToJsonFormat       format_;
 
     public:
-      FindVisitor(DicomToJsonFormat format) :
+      explicit FindVisitor(DicomToJsonFormat format) :
         isComplete_(false),
         format_(format)
       {
@@ -3217,9 +3217,9 @@
                 if (type == level)
                 {
                   for (std::set<std::string>::const_iterator
-                         it = children.begin(); it != children.end(); ++it)
+                         it2 = children.begin(); it2 != children.end(); ++it2)
                   {
-                    interest.insert(*it);
+                    interest.insert(*it2);
                   }
 
                   break;  // done