avoid compilation varnings

This commit is contained in:
Alexander 2018-04-15 01:20:57 +03:00
parent 497e9d8251
commit 4c983674c0

View File

@ -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*