# HG changeset patch # User Sebastien Jodogne # Date 1524493318 -7200 # Node ID 0b7e7be7d655998e3ff18a1d7efed2b3de283f69 # Parent 95832e6c436821a81584bafa3afb9263e61ab396 cppcheck diff -r 95832e6c4368 -r 0b7e7be7d655 Applications/Dicomizer.cpp --- a/Applications/Dicomizer.cpp Fri Apr 20 14:23:54 2018 +0200 +++ b/Applications/Dicomizer.cpp Mon Apr 23 16:21:58 2018 +0200 @@ -723,7 +723,7 @@ w = options[OPTION_TILE_WIDTH].as(); } - unsigned int h = 0; + int h = 0; if (options.count(OPTION_TILE_HEIGHT)) { h = options[OPTION_TILE_HEIGHT].as(); diff -r 95832e6c4368 -r 0b7e7be7d655 Framework/Inputs/DicomPyramidLevel.h --- a/Framework/Inputs/DicomPyramidLevel.h Fri Apr 20 14:23:54 2018 +0200 +++ b/Framework/Inputs/DicomPyramidLevel.h Mon Apr 23 16:21:58 2018 +0200 @@ -61,7 +61,7 @@ unsigned int tileY) const; public: - DicomPyramidLevel(DicomPyramidInstance& instance); + explicit DicomPyramidLevel(DicomPyramidInstance& instance); void AddInstance(DicomPyramidInstance& instance); diff -r 95832e6c4368 -r 0b7e7be7d655 Framework/Inputs/HierarchicalTiff.h --- a/Framework/Inputs/HierarchicalTiff.h Fri Apr 20 14:23:54 2018 +0200 +++ b/Framework/Inputs/HierarchicalTiff.h Mon Apr 23 16:21:58 2018 +0200 @@ -68,7 +68,7 @@ bool Initialize(); public: - HierarchicalTiff(const std::string& path); + explicit HierarchicalTiff(const std::string& path); virtual ~HierarchicalTiff() { diff -r 95832e6c4368 -r 0b7e7be7d655 Framework/Inputs/OpenSlideLibrary.h --- a/Framework/Inputs/OpenSlideLibrary.h Fri Apr 20 14:23:54 2018 +0200 +++ b/Framework/Inputs/OpenSlideLibrary.h Mon Apr 23 16:21:58 2018 +0200 @@ -47,7 +47,7 @@ FunctionReadRegion readRegion_; public: - OpenSlideLibrary(const std::string& path); + explicit OpenSlideLibrary(const std::string& path); static OpenSlideLibrary& GetInstance(); @@ -85,7 +85,7 @@ Image(OpenSlideLibrary& that, const std::string& path); - Image(const std::string& path); + explicit Image(const std::string& path); ~Image() { diff -r 95832e6c4368 -r 0b7e7be7d655 Framework/Inputs/TiledPyramidStatistics.h --- a/Framework/Inputs/TiledPyramidStatistics.h Fri Apr 20 14:23:54 2018 +0200 +++ b/Framework/Inputs/TiledPyramidStatistics.h Mon Apr 23 16:21:58 2018 +0200 @@ -36,7 +36,7 @@ unsigned int countDecodedTiles_; public: - TiledPyramidStatistics(ITiledPyramid& source); // Takes ownership + explicit TiledPyramidStatistics(ITiledPyramid& source); // Takes ownership virtual ~TiledPyramidStatistics(); diff -r 95832e6c4368 -r 0b7e7be7d655 Framework/Jpeg2000Reader.cpp --- a/Framework/Jpeg2000Reader.cpp Fri Apr 20 14:23:54 2018 +0200 +++ b/Framework/Jpeg2000Reader.cpp Mon Apr 23 16:21:58 2018 +0200 @@ -97,7 +97,8 @@ } public: - OpenJpegDecoder(Jpeg2000Format format) : dinfo_(NULL) + explicit OpenJpegDecoder(Jpeg2000Format format) : + dinfo_(NULL) { switch (format) { diff -r 95832e6c4368 -r 0b7e7be7d655 Framework/Jpeg2000Writer.cpp --- a/Framework/Jpeg2000Writer.cpp Fri Apr 20 14:23:54 2018 +0200 +++ b/Framework/Jpeg2000Writer.cpp Mon Apr 23 16:21:58 2018 +0200 @@ -246,7 +246,8 @@ #endif public: - OpenJpegOutput(OpenJpegEncoder& encoder) : cio_(NULL) + explicit OpenJpegOutput(OpenJpegEncoder& encoder) : + cio_(NULL) { #if ORTHANC_OPENJPEG_MAJOR_VERSION == 1 cio_ = opj_cio_open(reinterpret_cast(encoder.GetObject()), NULL, 0); diff -r 95832e6c4368 -r 0b7e7be7d655 Framework/Outputs/HierarchicalTiffWriter.cpp --- a/Framework/Outputs/HierarchicalTiffWriter.cpp Fri Apr 20 14:23:54 2018 +0200 +++ b/Framework/Outputs/HierarchicalTiffWriter.cpp Mon Apr 23 16:21:58 2018 +0200 @@ -386,6 +386,8 @@ unsigned int tileHeight) : PyramidWriterBase(pixelFormat, compression, tileWidth, tileHeight), currentLevel_(0), + nextX_(0), + nextY_(0), isFirst_(true) { tiff_ = TIFFOpen(path.c_str(), "w"); diff -r 95832e6c4368 -r 0b7e7be7d655 ViewerPlugin/Plugin.cpp --- a/ViewerPlugin/Plugin.cpp Fri Apr 20 14:23:54 2018 +0200 +++ b/ViewerPlugin/Plugin.cpp Mon Apr 23 16:21:58 2018 +0200 @@ -322,7 +322,7 @@ transcoderSemaphore_.reset(new Orthanc::Semaphore(threads)); char info[1024]; - sprintf(info, "The whole-slide imaging plugin will use at most %d threads to transcode the tiles", threads); + sprintf(info, "The whole-slide imaging plugin will use at most %u threads to transcode the tiles", threads); OrthancPluginLogWarning(context_, info); OrthancPluginSetDescription(context, "Provides a Web viewer of whole-slide microscopic images within Orthanc.");