diff options
author | Nick Clifton <nickc@redhat.com> | 2007-04-24 13:05:46 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2007-04-24 13:05:46 +0000 |
commit | 40b1c6c5d4ec74ccf53e7d192b555575093155cd (patch) | |
tree | 679f82a3b158788845b2bcdaf9b2f811ba82fe0b | |
parent | 1a0a850df64ce80209bb834ea1a37529a251a6c4 (diff) | |
download | gdb-40b1c6c5d4ec74ccf53e7d192b555575093155cd.zip gdb-40b1c6c5d4ec74ccf53e7d192b555575093155cd.tar.gz gdb-40b1c6c5d4ec74ccf53e7d192b555575093155cd.tar.bz2 |
Fix compile time warnings (at -O3 with gcc 4.1.2)
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/coff-m68k.c | 3 | ||||
-rw-r--r-- | bfd/coffcode.h | 1 |
3 files changed, 8 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 9fc72ca..9cfa98d 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2007-04-24 Nick Clifton <nickc@redhat.com> + + * coffcode.h (coff_slurp_reloc_table): Initialise dst.r_offset. + * coff-m68k.c (m68kcoff_rtype_to_howto): Initialize relent.howto. + 2007-04-24 Alan Modra <amodra@bigpond.net.au> * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Warn if diff --git a/bfd/coff-m68k.c b/bfd/coff-m68k.c index ae524e4..3d162a0 100644 --- a/bfd/coff-m68k.c +++ b/bfd/coff-m68k.c @@ -251,11 +251,12 @@ m68kcoff_rtype_to_howto (abfd, sec, rel, h, sym, addendp) arelent relent; reloc_howto_type *howto; + relent.howto = NULL; RTYPE2HOWTO (&relent, rel); howto = relent.howto; - if (howto->pc_relative) + if (howto != NULL && howto->pc_relative) *addendp += sec->vma; return howto; diff --git a/bfd/coffcode.h b/bfd/coffcode.h index 98d1c08..a2aac5f 100644 --- a/bfd/coffcode.h +++ b/bfd/coffcode.h @@ -4870,6 +4870,7 @@ coff_slurp_reloc_table (bfd * abfd, sec_ptr asect, asymbol ** symbols) cache_ptr = reloc_cache + idx; src = native_relocs + idx; + dst.r_offset = 0; coff_swap_reloc_in (abfd, src, &dst); #ifdef RELOC_PROCESSING |