From 8341f30f1ea87a22624031c2f5f670d1b9f8678a Mon Sep 17 00:00:00 2001 From: "Kristian H. Kristensen" Date: Fri, 22 May 2020 14:33:17 -0700 Subject: [PATCH] src/util: Remove out-of-range comparison MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Silence the warning about this always-true comparison. src/util/softfloat.c:214:42: warning: comparison of constant 32768 with expression of type 'int16_t' (aka 'short') is always false [-Wtautological-constant-out-of-range-compare] } else if ((e > 0x1d) || (0x8000 <= m)) { ~~~~~~ ^ ~ Reviewed-by: Rob Clark Reviewed-by: Marek Olšák Part-of: --- src/util/softfloat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/softfloat.c b/src/util/softfloat.c index 591128efd47..365b15bbf0c 100644 --- a/src/util/softfloat.c +++ b/src/util/softfloat.c @@ -211,7 +211,7 @@ uint16_t _mesa_roundtozero_f16(int16_t s, int16_t e, int16_t m) if (e < 0) { m = _mesa_shift_right_jam32(m, -e); e = 0; - } else if ((e > 0x1d) || (0x8000 <= m)) { + } else if (e > 0x1d) { e = 0x1f; m = 0; return (s << 15) + (e << 10) + m - 1; -- 2.30.2