summaryrefslogtreecommitdiff
blob: a975d42d15e9855bcf447b921f2074caa469889e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- a/thirdparty/lcms2/src/cmsplugin.c
+++ b/thirdparty/lcms2/src/cmsplugin.c
@@ -177,7 +177,7 @@ cmsBool CMSEXPORT  _cmsReadFloat32Number(cmsContext ContextID, cmsIOHANDLER* io,
     if (n != NULL) {
 
         tmp = _cmsAdjustEndianess32(tmp);
-        *n = *(cmsFloat32Number*)(void*)&tmp;
+        *n = (cmsFloat32Number)tmp;
 
         // Safeguard which covers against absurd values
         if (*n > 1E+20 || *n < -1E+20) return FALSE;
@@ -308,7 +308,7 @@ cmsBool CMSEXPORT  _cmsWriteFloat32Number(cmsContext ContextID, cmsIOHANDLER* io
 
     _cmsAssert(io != NULL);
 
-    tmp = *(cmsUInt32Number*) (void*) &n;
+    tmp = (cmsUInt32Number)n;
     tmp = _cmsAdjustEndianess32(tmp);
     if (io -> Write(ContextID, io, sizeof(cmsUInt32Number), &tmp) != 1)
             return FALSE;