This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] Fix maybe-uninitialized error on powerpc
- From: Matheus Castanho <msc at linux dot ibm dot com>
- To: libc-alpha at sourceware dot org
- Date: Thu, 9 Jan 2020 15:27:05 -0300
- Subject: [PATCH] Fix maybe-uninitialized error on powerpc
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