From: Li Zetao <lizetao1@huawei.com> To: <linux@armlinux.org.uk> Cc: <lizetao1@huawei.com>, <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org> Subject: [PATCH -next] arm/softfloat: Remove unused variable "bSign" Date: Sat, 24 Sep 2022 09:16:21 +0000 [thread overview] Message-ID: <20220924091621.4009468-1-lizetao1@huawei.com> (raw) Gcc report warning as follows: arch/arm/nwfpe/softfloat.c: In function ‘floatx80_rem’: arch/arm/nwfpe/softfloat.c:3071:17: error: variable ‘bSign’ set but not used [-Werror=unused-but-set-variable] arch/arm/nwfpe/softfloat.c: In function ‘float64_rem’: arch/arm/nwfpe/softfloat.c:2247:17: error: variable ‘bSign’ set but not used [-Werror=unused-but-set-variable] arch/arm/nwfpe/softfloat.c: In function ‘float32_rem’: arch/arm/nwfpe/softfloat.c:1349:17: error: variable ‘bSign’ set but not used [-Werror=unused-but-set-variable] Only assign value to variables "bSign", no final use. Fix by removing them. Signed-off-by: Li Zetao <lizetao1@huawei.com> --- arch/arm/nwfpe/softfloat.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/arch/arm/nwfpe/softfloat.c b/arch/arm/nwfpe/softfloat.c index ffa6b438786b..cbfba26a54af 100644 --- a/arch/arm/nwfpe/softfloat.c +++ b/arch/arm/nwfpe/softfloat.c @@ -1346,7 +1346,7 @@ according to the IEC/IEEE Standard for Binary Floating-point Arithmetic. */ float32 float32_rem( struct roundingData *roundData, float32 a, float32 b ) { - flag aSign, bSign, zSign; + flag aSign, zSign; int16 aExp, bExp, expDiff; bits32 aSig, bSig; bits32 q; @@ -1359,7 +1359,6 @@ float32 float32_rem( struct roundingData *roundData, float32 a, float32 b ) aSign = extractFloat32Sign( a ); bSig = extractFloat32Frac( b ); bExp = extractFloat32Exp( b ); - bSign = extractFloat32Sign( b ); if ( aExp == 0xFF ) { if ( aSig || ( ( bExp == 0xFF ) && bSig ) ) { return propagateFloat32NaN( a, b ); @@ -2244,7 +2243,7 @@ according to the IEC/IEEE Standard for Binary Floating-point Arithmetic. */ float64 float64_rem( struct roundingData *roundData, float64 a, float64 b ) { - flag aSign, bSign, zSign; + flag aSign, zSign; int16 aExp, bExp, expDiff; bits64 aSig, bSig; bits64 q, alternateASig; @@ -2255,7 +2254,6 @@ float64 float64_rem( struct roundingData *roundData, float64 a, float64 b ) aSign = extractFloat64Sign( a ); bSig = extractFloat64Frac( b ); bExp = extractFloat64Exp( b ); - bSign = extractFloat64Sign( b ); if ( aExp == 0x7FF ) { if ( aSig || ( ( bExp == 0x7FF ) && bSig ) ) { return propagateFloat64NaN( a, b ); @@ -3068,7 +3066,7 @@ according to the IEC/IEEE Standard for Binary Floating-point Arithmetic. */ floatx80 floatx80_rem( struct roundingData *roundData, floatx80 a, floatx80 b ) { - flag aSign, bSign, zSign; + flag aSign, zSign; int32 aExp, bExp, expDiff; bits64 aSig0, aSig1, bSig; bits64 q, term0, term1, alternateASig0, alternateASig1; @@ -3079,7 +3077,6 @@ floatx80 floatx80_rem( struct roundingData *roundData, floatx80 a, floatx80 b ) aSign = extractFloatx80Sign( a ); bSig = extractFloatx80Frac( b ); bExp = extractFloatx80Exp( b ); - bSign = extractFloatx80Sign( b ); if ( aExp == 0x7FFF ) { if ( (bits64) ( aSig0<<1 ) || ( ( bExp == 0x7FFF ) && (bits64) ( bSig<<1 ) ) ) { -- 2.34.1
WARNING: multiple messages have this Message-ID (diff)
From: Li Zetao <lizetao1@huawei.com> To: <linux@armlinux.org.uk> Cc: <lizetao1@huawei.com>, <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org> Subject: [PATCH -next] arm/softfloat: Remove unused variable "bSign" Date: Sat, 24 Sep 2022 09:16:21 +0000 [thread overview] Message-ID: <20220924091621.4009468-1-lizetao1@huawei.com> (raw) Gcc report warning as follows: arch/arm/nwfpe/softfloat.c: In function ‘floatx80_rem’: arch/arm/nwfpe/softfloat.c:3071:17: error: variable ‘bSign’ set but not used [-Werror=unused-but-set-variable] arch/arm/nwfpe/softfloat.c: In function ‘float64_rem’: arch/arm/nwfpe/softfloat.c:2247:17: error: variable ‘bSign’ set but not used [-Werror=unused-but-set-variable] arch/arm/nwfpe/softfloat.c: In function ‘float32_rem’: arch/arm/nwfpe/softfloat.c:1349:17: error: variable ‘bSign’ set but not used [-Werror=unused-but-set-variable] Only assign value to variables "bSign", no final use. Fix by removing them. Signed-off-by: Li Zetao <lizetao1@huawei.com> --- arch/arm/nwfpe/softfloat.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/arch/arm/nwfpe/softfloat.c b/arch/arm/nwfpe/softfloat.c index ffa6b438786b..cbfba26a54af 100644 --- a/arch/arm/nwfpe/softfloat.c +++ b/arch/arm/nwfpe/softfloat.c @@ -1346,7 +1346,7 @@ according to the IEC/IEEE Standard for Binary Floating-point Arithmetic. */ float32 float32_rem( struct roundingData *roundData, float32 a, float32 b ) { - flag aSign, bSign, zSign; + flag aSign, zSign; int16 aExp, bExp, expDiff; bits32 aSig, bSig; bits32 q; @@ -1359,7 +1359,6 @@ float32 float32_rem( struct roundingData *roundData, float32 a, float32 b ) aSign = extractFloat32Sign( a ); bSig = extractFloat32Frac( b ); bExp = extractFloat32Exp( b ); - bSign = extractFloat32Sign( b ); if ( aExp == 0xFF ) { if ( aSig || ( ( bExp == 0xFF ) && bSig ) ) { return propagateFloat32NaN( a, b ); @@ -2244,7 +2243,7 @@ according to the IEC/IEEE Standard for Binary Floating-point Arithmetic. */ float64 float64_rem( struct roundingData *roundData, float64 a, float64 b ) { - flag aSign, bSign, zSign; + flag aSign, zSign; int16 aExp, bExp, expDiff; bits64 aSig, bSig; bits64 q, alternateASig; @@ -2255,7 +2254,6 @@ float64 float64_rem( struct roundingData *roundData, float64 a, float64 b ) aSign = extractFloat64Sign( a ); bSig = extractFloat64Frac( b ); bExp = extractFloat64Exp( b ); - bSign = extractFloat64Sign( b ); if ( aExp == 0x7FF ) { if ( aSig || ( ( bExp == 0x7FF ) && bSig ) ) { return propagateFloat64NaN( a, b ); @@ -3068,7 +3066,7 @@ according to the IEC/IEEE Standard for Binary Floating-point Arithmetic. */ floatx80 floatx80_rem( struct roundingData *roundData, floatx80 a, floatx80 b ) { - flag aSign, bSign, zSign; + flag aSign, zSign; int32 aExp, bExp, expDiff; bits64 aSig0, aSig1, bSig; bits64 q, term0, term1, alternateASig0, alternateASig1; @@ -3079,7 +3077,6 @@ floatx80 floatx80_rem( struct roundingData *roundData, floatx80 a, floatx80 b ) aSign = extractFloatx80Sign( a ); bSig = extractFloatx80Frac( b ); bExp = extractFloatx80Exp( b ); - bSign = extractFloatx80Sign( b ); if ( aExp == 0x7FFF ) { if ( (bits64) ( aSig0<<1 ) || ( ( bExp == 0x7FFF ) && (bits64) ( bSig<<1 ) ) ) { -- 2.34.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2022-09-24 9:20 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-09-24 9:16 Li Zetao [this message] 2022-09-24 9:16 ` [PATCH -next] arm/softfloat: Remove unused variable "bSign" Li Zetao
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220924091621.4009468-1-lizetao1@huawei.com \ --to=lizetao1@huawei.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux@armlinux.org.uk \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.