mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-11 04:07:21 +03:00
avoid compilation varnings
This commit is contained in:
parent
497e9d8251
commit
4c983674c0
|
@ -445,6 +445,7 @@ float16tofloat32(const FLOAT16 in) {
|
|||
UINT32 t1;
|
||||
UINT32 t2;
|
||||
UINT32 t3;
|
||||
FLOAT32 out[1] = {0};
|
||||
|
||||
t1 = in & 0x7fff; // Non-sign bits
|
||||
t2 = in & 0x8000; // Sign bit
|
||||
|
@ -459,7 +460,8 @@ float16tofloat32(const FLOAT16 in) {
|
|||
|
||||
t1 |= t2; // Re-insert sign bit
|
||||
|
||||
return *(FLOAT32 *)&t1;
|
||||
memcpy(&t1, out, 4);
|
||||
return out[0];
|
||||
}
|
||||
|
||||
static inline PyObject*
|
||||
|
|
Loading…
Reference in New Issue
Block a user