# HG changeset patch # User Sebastien Jodogne # Date 1725082131 -7200 # Node ID acc9c70bc25a11bfc9300290bd65a2e6ee889dd3 # Parent bea4e7900a476e085101aefc4424120c11b43dd9 cppcheck diff -r bea4e7900a47 -r acc9c70bc25a Applications/Resources/RunCppCheck.sh --- a/Applications/Resources/RunCppCheck.sh Mon Aug 26 17:59:20 2024 +0200 +++ b/Applications/Resources/RunCppCheck.sh Sat Aug 31 07:28:51 2024 +0200 @@ -29,10 +29,12 @@ fi cat < /tmp/cppcheck-suppressions.txt +assertWithSideEffect:../../OrthancStone/Sources/Loaders/OrthancMultiframeVolumeLoader.cpp:341 +assertWithSideEffect:../../OrthancStone/Sources/Loaders/OrthancMultiframeVolumeLoader.cpp:342 constParameter:../../RenderingPlugin/Sources/Plugin.cpp:778 stlFindInsert:../../Applications/Samples/WebAssembly/SingleFrameViewer/SingleFrameViewerApplication.h -stlFindInsert:../../Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp:1166 -stlFindInsert:../../Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp:523 +stlFindInsert:../../Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp:1245 +stlFindInsert:../../Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp:601 unpreciseMathCall:../../OrthancStone/Sources/Scene2D/Internals/CairoFloatTextureRenderer.cpp unpreciseMathCall:../../OrthancStone/Sources/Scene2D/LookupTableTextureSceneLayer.cpp unreadVariable:../../OrthancStone/Sources/Platforms/Sdl/SdlViewport.cpp:159 diff -r bea4e7900a47 -r acc9c70bc25a Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp --- a/Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp Mon Aug 26 17:59:20 2024 +0200 +++ b/Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp Sat Aug 31 07:28:51 2024 +0200 @@ -239,7 +239,7 @@ std::unique_ptr frames_; public: - SortedFramesCollection(OrthancStone::SortedFrames* frames) + explicit SortedFramesCollection(OrthancStone::SortedFrames* frames) { if (frames == NULL) { diff -r bea4e7900a47 -r acc9c70bc25a OrthancStone/Sources/Toolbox/DicomStructuredReport.cpp --- a/OrthancStone/Sources/Toolbox/DicomStructuredReport.cpp Mon Aug 26 17:59:20 2024 +0200 +++ b/OrthancStone/Sources/Toolbox/DicomStructuredReport.cpp Sat Aug 31 07:28:51 2024 +0200 @@ -135,7 +135,9 @@ DicomStructuredReport::Structure::Structure(const std::string& sopInstanceUid) : sopInstanceUid_(sopInstanceUid), hasFrameNumber_(false), - hasProbabilityOfCancer_(false) + frameNumber_(0), // dummy initialization + hasProbabilityOfCancer_(false), + probabilityOfCancer_(0) // dummy initialization { } @@ -478,7 +480,7 @@ { uint32_t frame; if (!Orthanc::SerializationToolbox::ParseUnsignedInteger32(frame, tokens[m]) || - frame <= 0) + frame == 0) { throw Orthanc::OrthancException(Orthanc::ErrorCode_BadFileFormat); } diff -r bea4e7900a47 -r acc9c70bc25a OrthancStone/Sources/Toolbox/DicomStructuredReport.h --- a/OrthancStone/Sources/Toolbox/DicomStructuredReport.h Mon Aug 26 17:59:20 2024 +0200 +++ b/OrthancStone/Sources/Toolbox/DicomStructuredReport.h Sat Aug 31 07:28:51 2024 +0200 @@ -64,7 +64,7 @@ void Copy(const Structure& other); public: - Structure(const std::string& sopInstanceUid); + explicit Structure(const std::string& sopInstanceUid); virtual ~Structure() { @@ -262,9 +262,9 @@ } }; - DicomStructuredReport(Orthanc::ParsedDicomFile& dicom); + explicit DicomStructuredReport(Orthanc::ParsedDicomFile& dicom); - DicomStructuredReport(const DicomStructuredReport& other); // Copy constructor + explicit DicomStructuredReport(const DicomStructuredReport& other); // Copy constructor ~DicomStructuredReport();