Skip to content

Commit 83312f1

Browse files
Vincent ChenGreentime Hu
authored andcommitted
math-emu/soft-fp.h: (_FP_ROUND_ZERO) cast 0 to void to fix warning
_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 <[email protected]> Acked-by: Greentime Hu <[email protected]> Signed-off-by: Greentime Hu <[email protected]>
1 parent 7adb3e9 commit 83312f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/math-emu/soft-fp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ do { \
138138
_FP_FRAC_ADDI_##wc(X, _FP_WORK_ROUND); \
139139
} while (0)
140140

141-
#define _FP_ROUND_ZERO(wc, X) 0
141+
#define _FP_ROUND_ZERO(wc, X) (void)0
142142

143143
#define _FP_ROUND_PINF(wc, X) \
144144
do { \

0 commit comments

Comments
 (0)