diff --git a/rtengine/iimage.h b/rtengine/iimage.h index 7e88e407f..b06a188bc 100644 --- a/rtengine/iimage.h +++ b/rtengine/iimage.h @@ -1291,7 +1291,7 @@ public: b.height_ = height; #endif - abData.resize(width * height * 3); + abData.resize(width * height * 3u); if (!abData.isEmpty()) { data = abData.data; diff --git a/rtengine/image8.cc b/rtengine/image8.cc index 8cb2b887a..9eaf3afc5 100644 --- a/rtengine/image8.cc +++ b/rtengine/image8.cc @@ -67,7 +67,7 @@ void Image8::setScanline (int row, unsigned char* buffer, int bps, float *minVal switch (sampleFormat) { case (IIOSF_UNSIGNED_CHAR): - memcpy (data + row * width * 3, buffer, width * 3); + memcpy (data + row * width * 3u, buffer, width * 3); break; case (IIOSF_UNSIGNED_SHORT): {