[binutils-gdb] PR25100, Compile fails in elf64-ppc.c because of single equal sign instead of double equal for compa

Alan Modra amodra@sourceware.org
Tue Oct 15 06:24:00 GMT 2019


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

commit 779f2ae733cc4b4da666a2405eb77ec70df2c772
Author: Alan Modra <amodra@gmail.com>
Date:   Tue Oct 15 11:58:11 2019 +1030

    PR25100, Compile fails in elf64-ppc.c because of single equal sign instead of double equal for comparison
    
    	PR 25100
    	* elf64-ppc.c (sfpr_define): Delete dead code that triggered a warning.

Diff:
---
 bfd/ChangeLog   | 5 +++++
 bfd/elf64-ppc.c | 4 +---
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 4d8db19..40ddfa1 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,10 @@
 2019-10-15  Alan Modra  <amodra@gmail.com>
 
+	PR 25100
+	* elf64-ppc.c (sfpr_define): Delete dead code that triggered a warning.
+
+2019-10-15  Alan Modra  <amodra@gmail.com>
+
 	* bfd.c (bfd_check_compression_header): Check for powers of two
 	with x == (x & -x).
 
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 2731e78..4ece6fb 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -5837,9 +5837,7 @@ sfpr_define (struct bfd_link_info *info,
 	      s = elf_link_hash_lookup (&htab->elf, buf, TRUE, TRUE, FALSE);
 	      if (s == NULL)
 		return FALSE;
-	      if (s->root.type == bfd_link_hash_new
-		  || (s->root.type = bfd_link_hash_defined
-		      && s->root.u.def.section == stub_sec))
+	      if (s->root.type == bfd_link_hash_new)
 		{
 		  s->root.type = bfd_link_hash_defined;
 		  s->root.u.def.section = stub_sec;



More information about the Binutils-cvs mailing list