about summary refs log tree commit diff
path: root/ChangeLog
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2015-05-21 23:05:45 +0000
committerJoseph Myers <joseph@codesourcery.com>2015-05-21 23:05:45 +0000
commit89f3b6e18c6e7833438789746fcfc2e7189f7cac (patch)
tree285370ecb7b84c7ad70b289779c1dd141e549a8d /ChangeLog
parent9d12d7652b830635528639ece2206ecf5bb9ffbf (diff)
downloadglibc-89f3b6e18c6e7833438789746fcfc2e7189f7cac.tar.gz
glibc-89f3b6e18c6e7833438789746fcfc2e7189f7cac.tar.xz
glibc-89f3b6e18c6e7833438789746fcfc2e7189f7cac.zip
Fix sysdeps/ieee754/dbl-64/mpa.c for -Wuninitialized.
If you remove the "override CFLAGS += -Wno-uninitialized" in
math/Makefile, one of the errors you get is:

../sysdeps/ieee754/dbl-64/mpa.c: In function '__mp_dbl.part.0':
../sysdeps/ieee754/dbl-64/mpa.c:183:5: error: 'c' may be used uninitialized in this function [-Werror=maybe-uninitialized]
   c *= X[0];

The problem is that the p < 5 case initializes c if p is 1, 2, 3 or 4
but not otherwise, and in fact p is positive for all calls to this
function so the uninitialized case can't actually occur.  This patch
replaces the "if (p == 4)" last case with a comment so the compiler
can see that all paths do initialize c.

Tested for x86_64.

	* sysdeps/ieee754/dbl-64/mpa.c (norm): Remove if condition on
	(p == 4) case.
Diffstat (limited to 'ChangeLog')
-rw-r--r--ChangeLog3
1 files changed, 3 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index d61c22207a..bca6ba7a3f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2015-05-21  Joseph Myers  <joseph@codesourcery.com>
 
+	* sysdeps/ieee754/dbl-64/mpa.c (norm): Remove if condition on
+	(p == 4) case.
+
 	* conform/linknamespace.pl (@whitelist): Add re_syntax_options.
 	* conform/Makefile (test-xfail-UNIX98/regex.h/linknamespace):
 	Remove variable.