[PATCH] Fix maybe-uninitialized error on powerpc
Matheus Castanho
msc@linux.ibm.com
Thu Jan 9 18:27:00 GMT 2020
The build has been failing on powerpc64le-linux-gnu with GCC 10
due to a maybe-uninitialized error:
../sysdeps/ieee754/dbl-64/mpa.c:875:6: error: âw.eâ may be used
uninitialized in this function [-Werror=maybe-uninitialized]
875 | EY -= EX;
| ^~
This commits adds proper initialization to avoid it.
Tested on powerpc64le.
---
sysdeps/ieee754/dbl-64/mpa.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sysdeps/ieee754/dbl-64/mpa.c b/sysdeps/ieee754/dbl-64/mpa.c
index 3bb8bff90d..8ad0fc7535 100644
--- a/sysdeps/ieee754/dbl-64/mpa.c
+++ b/sysdeps/ieee754/dbl-64/mpa.c
@@ -895,6 +895,7 @@ SECTION
__dvd (const mp_no *x, const mp_no *y, mp_no *z, int p)
{
mp_no w;
+ w.e = 0;
if (X[0] == 0)
Z[0] = 0;
--
2.21.1
More information about the Libc-alpha
mailing list