This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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][OBVIOUS] bfd: remove unused local variable in elflink.c:init_reloc_cookie_rels


056bafd broke the build in ELF targets [-Werror=unused-but-set-variable]
I just pushed the fix below as obvious.

commit fbebaf4a56dd03251bc2e12fa6834d90555aa82a
Author: Jose E. Marchesi <jose.marchesi@oracle.com>
Date:   Tue Jun 6 00:01:58 2017 -0700

    bfd: remove unused local variable in elflink.c:init_reloc_cookie_rels
    
    bfd/ChangeLog:
    
    2017-06-06  Jose E. Marchesi  <jose.marchesi@oracle.com>
    
    	* elflink.c (init_reloc_cookie_rels): Remove unused variable
    	`bed'.

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index a138535..80bac36 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2017-06-06  Jose E. Marchesi  <jose.marchesi@oracle.com>
+
+	* elflink.c (init_reloc_cookie_rels): Remove unused variable
+	`bed'.
+
 2017-06-06  Maciej W. Rozycki  <macro@imgtec.com>
 
 	* elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 07d3ea5..7b001b7 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -12572,8 +12572,6 @@ init_reloc_cookie_rels (struct elf_reloc_cookie *cookie,
 			struct bfd_link_info *info, bfd *abfd,
 			asection *sec)
 {
-  const struct elf_backend_data *bed;
-
   if (sec->reloc_count == 0)
     {
       cookie->rels = NULL;
@@ -12581,8 +12579,6 @@ init_reloc_cookie_rels (struct elf_reloc_cookie *cookie,
     }
   else
     {
-      bed = get_elf_backend_data (abfd);
-
       cookie->rels = _bfd_elf_link_read_relocs (abfd, sec, NULL, NULL,
 						info->keep_memory);
       if (cookie->rels == NULL)


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