# HG changeset patch # User Sebastien Jodogne # Date 1729083706 -7200 # Node ID 0c34b6625c67c0b735d3968589f325b0cc9a0485 # Parent 196d0e18afa05f2045caf5b0aeda522a6a060ec1 cppcheck diff -r 196d0e18afa0 -r 0c34b6625c67 Framework/DicomizerParameters.cpp --- a/Framework/DicomizerParameters.cpp Wed Oct 16 14:58:02 2024 +0200 +++ b/Framework/DicomizerParameters.cpp Wed Oct 16 15:01:46 2024 +0200 @@ -365,7 +365,7 @@ void DicomizerParameters::SetTiffAlignment(unsigned int alignment) { - if (alignment <= 0) + if (alignment == 0) { throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange); } diff -r 196d0e18afa0 -r 0c34b6625c67 Framework/Inputs/OpenSlidePyramid.cpp --- a/Framework/Inputs/OpenSlidePyramid.cpp Wed Oct 16 14:58:02 2024 +0200 +++ b/Framework/Inputs/OpenSlidePyramid.cpp Wed Oct 16 15:01:46 2024 +0200 @@ -56,10 +56,10 @@ { isEmpty = true; - for (unsigned int y = 0; y < height && isEmpty; y++) + for (unsigned int yy = 0; yy < height && isEmpty; yy++) { - const uint8_t* p = reinterpret_cast(source->GetConstRow(y)); - for (unsigned int x = 0; x < width && isEmpty; x++) + const uint8_t* p = reinterpret_cast(source->GetConstRow(yy)); + for (unsigned int xx = 0; xx < width && isEmpty; xx++) { if (p[3] != 0) { @@ -83,11 +83,11 @@ uint8_t backgroundRed, backgroundGreen, backgroundBlue; GetBackgroundColor(backgroundRed, backgroundGreen, backgroundBlue); - for (unsigned int y = 0; y < height; y++) + for (unsigned int yy = 0; yy < height; yy++) { - const uint8_t* p = reinterpret_cast(source->GetConstRow(y)); - uint8_t* q = reinterpret_cast(target.GetRow(y)); - for (unsigned int x = 0; x < width; x++) + const uint8_t* p = reinterpret_cast(source->GetConstRow(yy)); + uint8_t* q = reinterpret_cast(target.GetRow(yy)); + for (unsigned int xx = 0; xx < width; xx++) { /** Alpha blending using integer arithmetics only (16 bits avoids overflows) diff -r 196d0e18afa0 -r 0c34b6625c67 Framework/TiffReader.h --- a/Framework/TiffReader.h Wed Oct 16 14:58:02 2024 +0200 +++ b/Framework/TiffReader.h Wed Oct 16 15:01:46 2024 +0200 @@ -37,7 +37,7 @@ TIFF* tiff_; public: - TiffReader(const std::string& path); + explicit TiffReader(const std::string& path); ~TiffReader();