diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc index 2474396c7..321cc919f 100644 --- a/rtengine/dcraw.cc +++ b/rtengine/dcraw.cc @@ -1937,9 +1937,11 @@ void CLASS hasselblad_correct() const ushort corners_shift[9] = { 2, 1, 2, 1, 0, 1, 2, 1, 2 }; for (row = 0; row < bh; row++) { const ushort maxdist = bw < bh ? bw/2-1 : bh/2-1; - const unsigned corners[9][2] = {{0,0}, {0,bw/2}, {0,bw-1}, - {bh/2,0},{bh/2,bw/2},{bh/2,bw-1}, - {bh-1,0},{bh-1,bw/2},{bh-1,bw-1}}; + const unsigned bwu = (unsigned)bw; + const unsigned bhu = (unsigned)bh; + const unsigned corners[9][2] = {{0,0}, {0,bwu/2}, {0,bwu-1}, + {bhu/2,0},{bhu/2,bwu/2},{bhu/2,bwu-1}, + {bhu-1,0},{bhu-1,bwu/2},{bhu-1,bwu-1}}; for (col = 0; col < bw; col++) { for (i = 0; i < 9; i++) { ushort dist = (ushort)sqrt(abs(corners[i][0] - row) * abs(corners[i][0] - row) + abs(corners[i][1] - col) * abs(corners[i][1] - col)); diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 88ed3f777..8180c353f 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -2004,9 +2004,9 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int //matrix for current working space TMatrix wiprof = iccStore->workingSpaceInverseMatrix (params->icm.working); const float wip[3][3] = { - {wiprof[0][0], wiprof[0][1], wiprof[0][2]}, - {wiprof[1][0], wiprof[1][1], wiprof[1][2]}, - {wiprof[2][0], wiprof[2][1], wiprof[2][2]} + {(float)wiprof[0][0], (float)wiprof[0][1], (float)wiprof[0][2]}, + {(float)wiprof[1][0], (float)wiprof[1][1], (float)wiprof[1][2]}, + {(float)wiprof[2][0], (float)wiprof[2][1], (float)wiprof[2][2]} }; #ifdef __SSE2__ diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index 32d91be64..1caaefe87 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -2745,7 +2745,9 @@ void RawImageSource::processFlatField(const RAWParams &raw, RawImage *riFlatFile */ void RawImageSource::copyOriginalPixels(const RAWParams &raw, RawImage *src, RawImage *riDark, RawImage *riFlatFile ) { - unsigned short black[4] = {ri->get_cblack(0), ri->get_cblack(1), ri->get_cblack(2), ri->get_cblack(3)}; + unsigned short black[4] = { + (unsigned short)ri->get_cblack(0), (unsigned short)ri->get_cblack(1), + (unsigned short)ri->get_cblack(2), (unsigned short)ri->get_cblack(3)}; if (ri->getSensorType() == ST_BAYER || ri->getSensorType() == ST_FUJI_XTRANS) { if (!rawData) { @@ -4218,7 +4220,10 @@ void RawImageSource::getRAWHistogram (LUTu & histRedRaw, LUTu & histGreenRaw, LU histRedRaw.clear(); histGreenRaw.clear(); histBlueRaw.clear(); - const float mult[4] = { 65535.0 / ri->get_white(0), 65535.0 / ri->get_white(1), 65535.0 / ri->get_white(2), 65535.0 / ri->get_white(3) }; + const float mult[4] = { 65535.0f / ri->get_white(0), + 65535.0f / ri->get_white(1), + 65535.0f / ri->get_white(2), + 65535.0f / ri->get_white(3) }; #ifdef _OPENMP int numThreads;