From 4ee0c0d0cc039327c54e83820ce1215351903b7c Mon Sep 17 00:00:00 2001 From: Stefano D'Angelo Date: Fri, 8 Dec 2023 00:24:04 +0100 Subject: [PATCH] fix two more warnings in bw_math (thx again kevin molcard) --- include/bw_math.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/bw_math.h b/include/bw_math.h index edab8a9..0f2b0e9 100644 --- a/include/bw_math.h +++ b/include/bw_math.h @@ -928,12 +928,12 @@ static inline float bw_sqrtf( union { float f; int32_t i; } v; v.f = x; int i = (v.i >> 26) & 0x38; - v.i += (int32_t)((0x200000e0 << i) & 0xff000000); + v.i += (int32_t)((0x200000e0 << i) & (int32_t)0xff000000); const float r = bw_rcpf(v.f); v.i = (((v.i - 0x3f82a127) >> 1) + 0x3f7d8fc7) & 0x7fffffff; v.f = v.f + v.f * (0.5f - 0.5f * r * v.f * v.f); v.f = v.f + v.f * (0.5f - 0.5f * r * v.f * v.f); - v.i -= (int32_t)((0x100000f0 << i) & 0xff000000); + v.i -= (int32_t)((0x100000f0 << i) & (int32_t)0xff000000); BW_ASSERT(bw_is_finite(v.f)); return v.f; }