Mesa (master): src/util: Remove out-of-range comparison
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue May 26 20:06:05 UTC 2020
Module: Mesa
Branch: master
Commit: 8341f30f1ea87a22624031c2f5f670d1b9f8678a
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8341f30f1ea87a22624031c2f5f670d1b9f8678a
Author: Kristian H. Kristensen <hoegsberg at google.com>
Date: Fri May 22 14:33:17 2020 -0700
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 <robdclark at chromium.org>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5174>
---
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;
More information about the mesa-commit
mailing list