Blob Blame Raw
--- digikam-5.7.0/core/libs/rawengine/libraw/internal/dcraw_common.cpp.orig	2017-09-05 09:51:22.000000000 +0100
+++ digikam-5.7.0/core/libs/rawengine/libraw/internal/dcraw_common.cpp	2018-01-10 02:46:30.990330876 +0000
@@ -5773,7 +5773,7 @@ static float my_roundf(float x) {
 static float _CanonConvertAperture(ushort in)
 {
   if ((in == (ushort)0xffe0) || (in == (ushort)0x7fff)) return 0.0f;
-  return powf64(2.0, in/64.0);
+  return powf64(2.0f, float(in/64.0));
 }
 
 static float _CanonConvertEV (short in)
@@ -6726,7 +6726,7 @@ void CLASS PentaxLensInfo (unsigned id,
 		if (table_buf[iLensData+9] &&
 			(fabs(imgdata.lens.makernotes.CurFocal) < 0.1f))
 		  imgdata.lens.makernotes.CurFocal =
-			10*(table_buf[iLensData+9]>>2) * powf64(4, (table_buf[iLensData+9] & 0x03)-2);
+			10*(table_buf[iLensData+9]>>2) * powf64(4.0f, (float)((table_buf[iLensData+9] & 0x03)-2));
 		if (table_buf[iLensData+10] & 0xf0)
 		  imgdata.lens.makernotes.MaxAp4CurFocal =
 			powf64(2.0f, (float)((table_buf[iLensData+10] & 0xf0) >>4)/4.0f);
@@ -7648,7 +7648,7 @@ void CLASS parse_makernote_0xc634(int ba
           {
             unsigned char cc;
             fread(&cc, 1, 1, ifp);
-            iso_speed = (int)(100.0 * powf64(2.0, (double)(cc) / 12.0 - 5.0));
+            iso_speed = (int)(100.0 * powf64(2.0f, (float)((double)(cc) / 12.0 - 5.0)));
             break;
           }
       }
@@ -9151,15 +9151,15 @@ void CLASS parse_makernote (int base, in
       }
     if (tag == 4 && len > 26 && len < 35) {
       if ((i=(get4(),get2())) != 0x7fff && (!iso_speed || iso_speed == 65535))
-	iso_speed = 50 * powf64(2.0, i/32.0 - 4);
+	iso_speed = 50 * powf64(2.0f, (float)(i/32.0 - 4));
 #ifdef LIBRAW_LIBRARY_BUILD
       get4();
 #else
       if ((i=(get2(),get2())) != 0x7fff && !aperture)
-	aperture = powf64(2.0, i/64.0);
+	aperture = powf64(2.0f, (float)(i/64.0));
 #endif
       if ((i=get2()) != 0xffff && !shutter)
-	shutter = powf64(2.0, (short) i/-32.0);
+	shutter = powf64(2.0f, (short) i/-32.0);
       wbi = (get2(),get2());
       shot_order = (get2(),get2());
     }
@@ -9768,11 +9768,11 @@ void CLASS parse_exif (int base)
       case 36868:  get_timestamp(0);			break;
       case 37377:  if ((expo = -getreal(type)) < 128 && shutter == 0.)
 		     tiff_ifd[tiff_nifds-1].t_shutter =
-			shutter = powf64(2.0, expo);
+			shutter = powf64(2.0f, (float)expo);
 		break;
       case 37378:                                       // 0x9202 ApertureValue
         if ((fabs(ape = getreal(type))<256.0) && (!aperture))
-          aperture = powf64(2.0, ape/2);
+          aperture = powf64(2.0f, (float)ape/2);
         break;
       case 37385:  flash_used = getreal(type);          break;
       case 37386:  focal_len = getreal(type);		break;
@@ -11716,9 +11716,9 @@ void CLASS parse_ciff (int offset, int l
       aperture  = _CanonConvertAperture((get2(),get2()));
       imgdata.lens.makernotes.CurAp = aperture;
 #else
-      aperture  = powf64(2.0, (get2(),(short)get2())/64.0);
+      aperture  = powf64(2.0f, (get2(),(short)get2())/64.0);
 #endif
-      shutter   = powf64(2.0,-((short)get2())/32.0);
+      shutter   = powf64(2.0f,(float)(-((short)get2())/32.0));
       wbi = (get2(),get2());
       if (wbi > 17) wbi = 0;
       fseek (ifp, 32, SEEK_CUR);