Skip to content

Commit

Permalink
math-emu/soft-fp.h: (_FP_ROUND_ZERO) cast 0 to void to fix warning
Browse files Browse the repository at this point in the history
[ Upstream commit 83312f1b7ae205dca647bf52bbe2d51303cdedfb ]

_FP_ROUND_ZERO is defined as 0 and used as a statemente in macro
_FP_ROUND. This generates "error: statement with no effect
[-Werror=unused-value]" from gcc. Defining _FP_ROUND_ZERO as (void)0 to
fix it.

This modification is quoted from glibc 'commit <In libc/:>
(8ed1e7d5894000c155acbd06f)'

Signed-off-by: Vincent Chen <vincentc@andestech.com>
Acked-by: Greentime Hu <greentime@andestech.com>
Signed-off-by: Greentime Hu <greentime@andestech.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Vincent Chen authored and gregkh committed Dec 17, 2019
1 parent 97a0586 commit 977c761
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/math-emu/soft-fp.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ do { \
_FP_FRAC_ADDI_##wc(X, _FP_WORK_ROUND); \
} while (0)

#define _FP_ROUND_ZERO(wc, X) 0
#define _FP_ROUND_ZERO(wc, X) (void)0

#define _FP_ROUND_PINF(wc, X) \
do { \
Expand Down

0 comments on commit 977c761

Please sign in to comment.