unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Fix maybe-uninitialized error on powerpc
@ 2020-01-09 18:27 Matheus Castanho
  2020-01-09 18:48 ` Joseph Myers
  0 siblings, 1 reply; 3+ messages in thread
From: Matheus Castanho @ 2020-01-09 18:27 UTC (permalink / raw)
  To: libc-alpha

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-01-13 13:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-09 18:27 [PATCH] Fix maybe-uninitialized error on powerpc Matheus Castanho
2020-01-09 18:48 ` Joseph Myers
2020-01-13 13:47   ` Matheus Castanho

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).