aboutsummaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
authorKristian H. Kristensen <[email protected]>2020-05-22 14:33:17 -0700
committerKristian H. Kristensen <[email protected]>2020-05-26 12:46:18 -0700
commit8341f30f1ea87a22624031c2f5f670d1b9f8678a (patch)
treeaf5995e9560b163f133aa3ab3531ca7556cc6390 /src/util
parentf4e64e9f530c22e779ef5747c2a927bdd5b6c47d (diff)
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 <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5174>
Diffstat (limited to 'src/util')
-rw-r--r--src/util/softfloat.c2
1 files changed, 1 insertions, 1 deletions
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;