From dba5d401bb22e8ef71cc5896ecd5fb102901baed Mon Sep 17 00:00:00 2001 From: Svyatoslav Kuzmich Date: Fri, 20 Jan 2023 15:00:15 +0100 Subject: [PATCH] [Wasm] fdlibm NFC: Remove dead code in expm1 Fixes warning that value of y is never used before it is read. Removed dead code is not present in FreeBSD codebase since at least 1994 https://github.com/freebsd/freebsd-src/blame/34ac629b40e68e5394fe0a27e47c73a875d9f8cb/lib/msun/src/s_expm1.c#L141 --- libraries/stdlib/wasm/src/kotlin/math/fdlibm/s_expm1.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/libraries/stdlib/wasm/src/kotlin/math/fdlibm/s_expm1.kt b/libraries/stdlib/wasm/src/kotlin/math/fdlibm/s_expm1.kt index 31f46f69e5e..18732571091 100644 --- a/libraries/stdlib/wasm/src/kotlin/math/fdlibm/s_expm1.kt +++ b/libraries/stdlib/wasm/src/kotlin/math/fdlibm/s_expm1.kt @@ -139,7 +139,6 @@ internal fun expm1(_x: Double): Double { hx = __HIu(x) /* high word of x */ xsb = (hx and Int.MIN_VALUE.toUInt()).toInt() /* sign bit of x */ - if (xsb == 0) y = x; else y = -x /* y = |x| */ hx = (hx and 0x7fffffffU) /* high word of |x| */ /* filter out huge and non-finite argument */