[binutils-gdb] Fix compile time warnings about using possibly uninitialised variables in rs6000-core.c.

Nick Clifton nickc@sourceware.org
Thu Mar 9 16:01:00 GMT 2017


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=f03265d9cda1f5f8df238efa9b7a20330e5711f1

commit f03265d9cda1f5f8df238efa9b7a20330e5711f1
Author: Sam Thursfield <sam.thursfield@codethink.co.uk>
Date:   Thu Mar 9 15:58:39 2017 +0000

    Fix compile time warnings about using possibly uninitialised variables in rs6000-core.c.
    
    	* rs6000-core.c (CORE_NEW): Simplify macro when
    	AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.

Diff:
---
 bfd/ChangeLog     | 5 +++++
 bfd/rs6000-core.c | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 9560ad2..0fcaa3b 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2017-03-09  Sam Thursfield  <sam.thursfield@codethink.co.uk>
+
+	* rs6000-core.c (CORE_NEW): Simplify macro when
+	AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
+
 2017-03-07  Alan Modra  <amodra@gmail.com>
 
 	PR 21224
diff --git a/bfd/rs6000-core.c b/bfd/rs6000-core.c
index 0e66cc3..6951e67 100644
--- a/bfd/rs6000-core.c
+++ b/bfd/rs6000-core.c
@@ -135,9 +135,9 @@ typedef union
 
 #ifdef AIX_CORE_DUMPX_CORE
 # ifndef BFD64
-#  define CORE_NEW(c)        (!(c).old.c_entries)
+#  define CORE_NEW(c)	(!(c).old.c_entries)
 # else
-#  define CORE_NEW(c)   (!(c).new_dump.c_entries)
+#  define CORE_NEW(c)	1
 # endif
 #else
 # define CORE_NEW(c)	0



More information about the Binutils-cvs mailing list