Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src cast to int as the fake relocs are not in enum elf_ppc_reloc...



details:   https://anonhg.NetBSD.org/src/rev/c50d2ac6b775
branches:  trunk
changeset: 766991:c50d2ac6b775
user:      mrg <mrg%NetBSD.org@localhost>
date:      Wed Jul 06 09:01:35 2011 +0000

description:
cast to int as the fake relocs are not in enum elf_ppc_reloc_type, and
GCC 4.5 complains about values not in the enum as part of a switch block.

diffstat:

 external/gpl3/binutils/dist/bfd/elf32-ppc.c |  3 ++-
 gnu/dist/gdb6/bfd/elf32-ppc.c               |  3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 681dec1bab6b -r c50d2ac6b775 external/gpl3/binutils/dist/bfd/elf32-ppc.c
--- a/external/gpl3/binutils/dist/bfd/elf32-ppc.c       Wed Jul 06 01:29:54 2011 +0000
+++ b/external/gpl3/binutils/dist/bfd/elf32-ppc.c       Wed Jul 06 09:01:35 2011 +0000
@@ -3352,7 +3352,8 @@
        }
 
       r_type = ELF32_R_TYPE (rel->r_info);
-      switch (r_type)
+      /* Cast to int as the fake relocs are not in enum elf_ppc_reloc_type.  */
+      switch ((int)r_type)
        {
        case R_PPC_GOT_TLSLD16:
        case R_PPC_GOT_TLSLD16_LO:
diff -r 681dec1bab6b -r c50d2ac6b775 gnu/dist/gdb6/bfd/elf32-ppc.c
--- a/gnu/dist/gdb6/bfd/elf32-ppc.c     Wed Jul 06 01:29:54 2011 +0000
+++ b/gnu/dist/gdb6/bfd/elf32-ppc.c     Wed Jul 06 09:01:35 2011 +0000
@@ -5842,7 +5842,8 @@
       howto = NULL;
       if (r_type < R_PPC_max)
        howto = ppc_elf_howto_table[r_type];
-      switch (r_type)
+      /* Cast to int as the fake relocs are not in enum elf_ppc_reloc_type.  */
+      switch ((int)r_type)
        {
        default:
          (*_bfd_error_handler)



Home | Main Index | Thread Index | Old Index