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]

Re: elf32-rl78.c build warning [Re: New port: Renesas RL78]


> elf32-rl78.c: In function ârl78_elf_merge_private_bfd_dataâ:
> elf32-rl78.c:1016:12: error: variable âold_flagsâ set but not used [-Werror=unused-but-set-variable]

[bfd]
	* elf32-rl78.c (rl78_elf_merge_private_bfd_data): Delete unused
	variable.

[gas]
	* config/tc-rl78.c (tc_gen_reloc): Remove unused variable.

Index: bfd/elf32-rl78.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-rl78.c,v
retrieving revision 1.1
diff -p -U5 -r1.1  bfd/elf32-rl78.c
--- bfd/elf32-rl78.c	2 Nov 2011 03:09:00 -0000	1.1
+++ bfd/elf32-rl78.c	2 Nov 2011 20:38:55 -0000
@@ -1011,16 +1011,14 @@ bfd_elf32_rl78_set_target_flags (bfd_boo
    object file when linking.  */
 
 static bfd_boolean
 rl78_elf_merge_private_bfd_data (bfd * ibfd, bfd * obfd)
 {
-  flagword old_flags;
   flagword new_flags;
   bfd_boolean error = FALSE;
 
   new_flags = elf_elfheader (ibfd)->e_flags;
-  old_flags = elf_elfheader (obfd)->e_flags;
 
   if (!elf_flags_init (obfd))
     {
       /* First call, no flags set.  */
       elf_flags_init (obfd) = TRUE;
Index: gas/config/tc-rl78.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-rl78.c,v
retrieving revision 1.1
diff -p -U5 -r1.1  gas/config/tc-rl78.c
--- gas/config/tc-rl78.c	2 Nov 2011 03:09:05 -0000	1.1
+++ gas/config/tc-rl78.c	2 Nov 2011 20:38:56 -0000
@@ -480,11 +480,10 @@ md_estimate_size_before_relax (fragS * f
 arelent **
 tc_gen_reloc (asection * seg ATTRIBUTE_UNUSED, fixS * fixp)
 {
   static arelent * reloc[8];
   int rp;
-  int is_opcode = 0;
 
   if (fixp->fx_r_type == BFD_RELOC_NONE)
     {
       reloc[0] = NULL;
       return reloc;
@@ -505,11 +504,10 @@ tc_gen_reloc (asection * seg ATTRIBUTE_U
 
   if (fixp->fx_r_type == BFD_RELOC_RL78_32_OP
       && fixp->fx_subsy)
     {
       fixp->fx_r_type = BFD_RELOC_RL78_DIFF;
-      is_opcode = 1;
     }
 
 #define OPX(REL,SYM,ADD)							\
   reloc[rp]		   = (arelent *) xmalloc (sizeof (arelent));		\
   reloc[rp]->sym_ptr_ptr   = (asymbol **) xmalloc (sizeof (asymbol *));		\


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