mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-06-29 17:33:08 +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 t1;
|
||||||
UINT32 t2;
|
UINT32 t2;
|
||||||
UINT32 t3;
|
UINT32 t3;
|
||||||
|
FLOAT32 out[1] = {0};
|
||||||
|
|
||||||
t1 = in & 0x7fff; // Non-sign bits
|
t1 = in & 0x7fff; // Non-sign bits
|
||||||
t2 = in & 0x8000; // Sign bit
|
t2 = in & 0x8000; // Sign bit
|
||||||
|
@ -459,7 +460,8 @@ float16tofloat32(const FLOAT16 in) {
|
||||||
|
|
||||||
t1 |= t2; // Re-insert sign bit
|
t1 |= t2; // Re-insert sign bit
|
||||||
|
|
||||||
return *(FLOAT32 *)&t1;
|
memcpy(&t1, out, 4);
|
||||||
|
return out[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline PyObject*
|
static inline PyObject*
|
||||||
|
|
Loading…
Reference in New Issue
Block a user