This is the mail archive of the binutils@sources.redhat.com 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]

Warning clean-up in BFD for SH


This gets us rid of some warnings that show up while building binutils
with --target=sh-elf with warnings enabled.  Ok to install?

Index: bfd/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* elf32-sh.c (sh_elf_reloc_loop): Warning removal.

Index: bfd/elf32-sh.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-sh.c,v
retrieving revision 1.11
diff -u -r1.11 elf32-sh.c
--- bfd/elf32-sh.c	2000/05/15 23:10:59	1.11
+++ bfd/elf32-sh.c	2000/08/01 07:58:15
@@ -455,7 +455,7 @@
 static bfd_reloc_status_type
 sh_elf_reloc_loop (r_type, input_bfd, input_section, contents, addr,
                    symbol_section, start, end)
-     int r_type;
+     int r_type ATTRIBUTE_UNUSED;
      bfd *input_bfd;
      asection *input_section;
      bfd_byte *contents;
@@ -517,7 +517,7 @@
       for (last_ptr = ptr, ptr -= 4; ptr >= start_ptr && IS_PPI (ptr);)
 	ptr -= 2;
       ptr += 2;
-      diff = last_ptr - ptr >> 1;
+      diff = (last_ptr - ptr) >> 1;
       cum_diff += diff & 1;
       cum_diff += diff;
     }
@@ -554,7 +554,7 @@
   if (x < -128 || x > 127)
     return bfd_reloc_overflow;
 
-  x = insn & ~0xff | x & 0xff;
+  x = (insn & ~0xff) | (x & 0xff);
   bfd_put_16 (input_bfd, x, contents + addr);
 
   return bfd_reloc_ok;

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

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