From: Kristian H. Kristensen Date: Fri, 22 May 2020 21:33:17 +0000 (-0700) Subject: src/util: Remove out-of-range comparison X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8341f30f1ea87a22624031c2f5f670d1b9f8678a;p=mesa.git src/util: Remove out-of-range comparison 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: --- 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;