This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]