From 51f5e7bfc39cf37daf728331119e82f9b6dd874b Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Mon, 4 May 2020 18:29:28 +0300 Subject: [PATCH] Warning fix. --- softfloat/softfloat.cpp | 6 ++++-- softfloat/softfloat_decimal.cpp | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/softfloat/softfloat.cpp b/softfloat/softfloat.cpp index 801261d9..da950337 100644 --- a/softfloat/softfloat.cpp +++ b/softfloat/softfloat.cpp @@ -178,7 +178,8 @@ precision80: ++zExp; zSig0 = LIT64( 0x8000000000000000 ); } else { - zSig0 &= ~ ( ( (uint64_t) ( zSig1<<1 ) == 0 ) & ( status->float_rounding_mode == float_round_nearest_even ) ); + if ((zSig1 << 1) == 0 && status->float_rounding_mode == float_round_nearest_even) + zSig0 &= ~1; } } else { if ( zSig0 == 0 ) zExp = 0; @@ -297,7 +298,8 @@ precision80: ++zExp; zSig0 = LIT64( 0x8000000000000000 ); } else { - zSig0 &= ~ ( ( (uint64_t) ( zSig1<<1 ) == 0 ) & ( floatx80_internal_mode == float_round_nearest_even ) ); + if ((zSig1 << 1) == 0 && floatx80_internal_mode == float_round_nearest_even) + zSig0 &= ~1; } } else { if ( zSig0 == 0 ) zExp = 0; diff --git a/softfloat/softfloat_decimal.cpp b/softfloat/softfloat_decimal.cpp index ccb7f5a9..a272b032 100644 --- a/softfloat/softfloat_decimal.cpp +++ b/softfloat/softfloat_decimal.cpp @@ -55,7 +55,8 @@ static void round128to64(flag aSign, int32_t *aExp, uint64_t *aSig0, uint64_t *a ++zExp; zSig0 = LIT64(0x8000000000000000); } else { - zSig0 &= ~ (((uint64_t) (zSig1<<1) == 0) & (status->float_rounding_mode == float_round_nearest_even)); + if ((zSig1 << 1) == 0 && status->float_rounding_mode == float_round_nearest_even) + zSig0 &= ~1; } } else { if ( zSig0 == 0 ) zExp = 0; -- 2.47.3