bfd/epiphany: remove unused epiphany_relaxed variable

Message ID 20261030150008.1142901-1-simon.marchi@efficios.com
State New
Headers
Series bfd/epiphany: remove unused epiphany_relaxed variable |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_binutils_build--master-arm success Build passed
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 success Build passed
linaro-tcwg-bot/tcwg_binutils_check--master-aarch64 success Test passed
linaro-tcwg-bot/tcwg_binutils_check--master-arm success Test passed

Commit Message

Simon Marchi Oct. 30, 2026, 2:53 p.m. UTC
  Building bfd with a recent clang fails with:

    /home/smarchi/src/binutils-gdb/bfd/elf32-epiphany.c:45:13: error: variable 'epiphany_relaxed' set but not used [-Werror,-Wunused-but-set-global]

The variable has been unused since the epiphany port was added in commit
cfb8c0921c8a (2011-10-25).  Remove it.

Cc: Joern Rennecke <joern.rennecke@embecosm.com>
---
 bfd/elf32-epiphany.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)


base-commit: 5ffe4ba215c0bc186b91c85739350a67a8f61a0f
  

Comments

Alan Modra Nov. 10, 2026, 4:50 a.m. UTC | #1
On Fri, Oct 30, 2026 at 10:53:58AM -0400, Simon Marchi wrote:
> Building bfd with a recent clang fails with:
> 
>     /home/smarchi/src/binutils-gdb/bfd/elf32-epiphany.c:45:13: error: variable 'epiphany_relaxed' set but not used [-Werror,-Wunused-but-set-global]
> 
> The variable has been unused since the epiphany port was added in commit
> cfb8c0921c8a (2011-10-25).  Remove it.

OK.
  
Simon Marchi Nov. 10, 2026, 7:47 p.m. UTC | #2
On 11/9/26 11:50 PM, Alan Modra wrote:
> On Fri, Oct 30, 2026 at 10:53:58AM -0400, Simon Marchi wrote:
>> Building bfd with a recent clang fails with:
>>
>>     /home/smarchi/src/binutils-gdb/bfd/elf32-epiphany.c:45:13: error: variable 'epiphany_relaxed' set but not used [-Werror,-Wunused-but-set-global]
>>
>> The variable has been unused since the epiphany port was added in commit
>> cfb8c0921c8a (2011-10-25).  Remove it.
> 
> OK.
> 
> -- 
> Alan Modra

Thanks, pushed.

Simon
  

Patch

diff --git a/bfd/elf32-epiphany.c b/bfd/elf32-epiphany.c
index 5cb317ff155a..a60927b1d1de 100644
--- a/bfd/elf32-epiphany.c
+++ b/bfd/elf32-epiphany.c
@@ -42,8 +42,6 @@  struct epiphany_opcode
   unsigned short mask;
 };
 
-static bool epiphany_relaxed = false;
-
 /* Relocation tables.  */
 static reloc_howto_type epiphany_elf_howto_table [] =
 {
@@ -198,10 +196,7 @@  epiphany_elf_relax_section (bfd *abfd, asection *sec,
   *again = false;
 
   if (first_section == NULL)
-    {
-      epiphany_relaxed = true;
-      first_section = sec;
-    }
+    first_section = sec;
 
   if (first_section == sec)
     {