From 5d01ca923aa7e4487caf6fefcc461a9cb8b373da Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Thu, 22 Dec 2011 19:34:37 +0000 Subject: [PATCH] core: fix compilation warnings in one of the float-to-half LUTs. --- src/half.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/half.cpp b/src/half.cpp index b6e07ed3..d6fcf457 100644 --- a/src/half.cpp +++ b/src/half.cpp @@ -46,13 +46,11 @@ static inline uint16_t float_to_half_nobranch(uint32_t x) static uint16_t const basetable[512] = { #define S1(i) (((i) < 103) ? 0x0000 : \ - ((i) < 113) ? 0x0400 >> (113 - (i)) : \ + ((i) < 113) ? 0x0400 >> (0x1f & (113 - (i))) : \ ((i) < 143) ? ((i) - 112) << 10 : 0x7c00) S256(0), #undef S1 -#define S1(i) (0x8000 | (((i) < 103) ? 0x0000 : \ - ((i) < 113) ? 0x0400 >> (113 - (i)) : \ - ((i) < 143) ? ((i) - 112) << 10 : 0x7c00)) +#define S1(i) (0x8000 | basetable[i]) S256(0), #undef S1 };