# HG changeset patch # User Sebastien Jodogne # Date 1601475948 -7200 # Node ID 3d6f14a05db1e154dca56598e1d3c3ae44fef6bc # Parent 7461f98c23a0cad9d96287f297a6d2314f6b14cf cppcheck diff -r 7461f98c23a0 -r 3d6f14a05db1 OrthancFramework/Sources/DicomFormat/DicomStreamReader.h --- a/OrthancFramework/Sources/DicomFormat/DicomStreamReader.h Wed Sep 30 15:53:17 2020 +0200 +++ b/OrthancFramework/Sources/DicomFormat/DicomStreamReader.h Wed Sep 30 16:25:48 2020 +0200 @@ -104,7 +104,7 @@ const std::string& block); public: - DicomStreamReader(std::istream& stream); + explicit DicomStreamReader(std::istream& stream); /** * Consume all the available bytes from the input stream, until diff -r 7461f98c23a0 -r 3d6f14a05db1 OrthancFramework/Sources/DicomFormat/StreamBlockReader.h --- a/OrthancFramework/Sources/DicomFormat/StreamBlockReader.h Wed Sep 30 15:53:17 2020 +0200 +++ b/OrthancFramework/Sources/DicomFormat/StreamBlockReader.h Wed Sep 30 16:25:48 2020 +0200 @@ -43,7 +43,7 @@ uint64_t processedBytes_; public: - StreamBlockReader(std::istream& stream); + explicit StreamBlockReader(std::istream& stream); /** * Schedule the size of the next block to be extracted from the diff -r 7461f98c23a0 -r 3d6f14a05db1 OrthancFramework/Sources/SystemToolbox.cpp --- a/OrthancFramework/Sources/SystemToolbox.cpp Wed Sep 30 15:53:17 2020 +0200 +++ b/OrthancFramework/Sources/SystemToolbox.cpp Wed Sep 30 16:25:48 2020 +0200 @@ -308,7 +308,7 @@ // https://stackoverflow.com/a/23826489/881731 f.flush(); - bool success = false; + bool success; /** * "f->handle()" corresponds to "FILE*" (aka "HANDLE") on diff -r 7461f98c23a0 -r 3d6f14a05db1 OrthancFramework/UnitTestsSources/DicomMapTests.cpp --- a/OrthancFramework/UnitTestsSources/DicomMapTests.cpp Wed Sep 30 15:53:17 2020 +0200 +++ b/OrthancFramework/UnitTestsSources/DicomMapTests.cpp Wed Sep 30 16:25:48 2020 +0200 @@ -885,12 +885,12 @@ r.Consume(visitor); - printf(">> %d\n", r.GetProcessedBytes()); + printf(">> %d\n", static_cast(r.GetProcessedBytes())); } TEST(DicomStreamReader, DISABLED_Tutu2) { - static const std::string PATH = "/home/jodogne/Subversion/orthanc-tests/Database/TransferSyntaxes/"; + //static const std::string PATH = "/home/jodogne/Subversion/orthanc-tests/Database/TransferSyntaxes/"; //const std::string path = PATH + "1.2.840.10008.1.2.4.50.dcm"; //const std::string path = PATH + "1.2.840.10008.1.2.2.dcm"; @@ -903,7 +903,7 @@ r.Consume(visitor); - printf(">> %d\n", r.GetProcessedBytes()); + printf(">> %d\n", static_cast(r.GetProcessedBytes())); } @@ -1011,5 +1011,5 @@ printf("[%s]\n", it->c_str()); } - printf("\n== SUCCESSES: %d ==\n\n", success); + printf("\n== SUCCESSES: %u ==\n\n", success); } diff -r 7461f98c23a0 -r 3d6f14a05db1 OrthancServer/Plugins/Engine/OrthancPlugins.cpp --- a/OrthancServer/Plugins/Engine/OrthancPlugins.cpp Wed Sep 30 15:53:17 2020 +0200 +++ b/OrthancServer/Plugins/Engine/OrthancPlugins.cpp Wed Sep 30 16:25:48 2020 +0200 @@ -730,7 +730,7 @@ boost::regex regex_; public: - explicit ChunkedRestCallback(_OrthancPluginChunkedRestCallback parameters) : + explicit ChunkedRestCallback(const _OrthancPluginChunkedRestCallback& parameters) : parameters_(parameters), regex_(parameters.pathRegularExpression) { @@ -759,7 +759,7 @@ void* handler_; public: - Handler(_OrthancPluginRegisterStorageCommitmentScpCallback parameters, + Handler(const _OrthancPluginRegisterStorageCommitmentScpCallback& parameters, void* handler) : parameters_(parameters), handler_(handler) @@ -800,7 +800,7 @@ _OrthancPluginRegisterStorageCommitmentScpCallback parameters_; public: - explicit StorageCommitmentScp(_OrthancPluginRegisterStorageCommitmentScpCallback parameters) : + explicit StorageCommitmentScp(const _OrthancPluginRegisterStorageCommitmentScpCallback& parameters) : parameters_(parameters) { } diff -r 7461f98c23a0 -r 3d6f14a05db1 OrthancServer/Resources/RunCppCheck.sh --- a/OrthancServer/Resources/RunCppCheck.sh Wed Sep 30 15:53:17 2020 +0200 +++ b/OrthancServer/Resources/RunCppCheck.sh Wed Sep 30 16:25:48 2020 +0200 @@ -14,7 +14,7 @@ knownConditionTrueFalse:../../OrthancServer/Plugins/Engine/OrthancPlugins.cpp nullPointer:../../OrthancFramework/UnitTestsSources/RestApiTests.cpp:309 nullPointerRedundantCheck:../../OrthancFramework/UnitTestsSources/DicomMapTests.cpp -stlFindInsert:../../OrthancFramework/Sources/DicomFormat/DicomMap.cpp:1070 +stlFindInsert:../../OrthancFramework/Sources/DicomFormat/DicomMap.cpp:1103 stlFindInsert:../../OrthancServer/Sources/ServerIndex.cpp:400 syntaxError:../../OrthancFramework/Sources/SQLite/FunctionContext.h:50 syntaxError:../../OrthancFramework/UnitTestsSources/ZipTests.cpp:129 diff -r 7461f98c23a0 -r 3d6f14a05db1 OrthancServer/Sources/ServerJobs/ResourceModificationJob.cpp --- a/OrthancServer/Sources/ServerJobs/ResourceModificationJob.cpp Wed Sep 30 15:53:17 2020 +0200 +++ b/OrthancServer/Sources/ServerJobs/ResourceModificationJob.cpp Wed Sep 30 16:25:48 2020 +0200 @@ -414,7 +414,8 @@ ResourceModificationJob::ResourceModificationJob(ServerContext& context, const Json::Value& serialized) : - CleaningInstancesJob(context, serialized, true /* by default, keep source */) + CleaningInstancesJob(context, serialized, true /* by default, keep source */), + transferSyntax_(DicomTransferSyntax_LittleEndianExplicit) // dummy initialization { assert(serialized.type() == Json::objectValue);