* elf64-ppc.c (ppc64_elf_edit_opd): Avoid gcc warning.
authorAlan Modra <amodra@gmail.com>
Mon, 22 Jun 2009 00:00:32 +0000 (00:00 +0000)
committerAlan Modra <amodra@gmail.com>
Mon, 22 Jun 2009 00:00:32 +0000 (00:00 +0000)
bfd/ChangeLog
bfd/elf64-ppc.c

index f01de47a7970ab6a85ca849b054113a946f22495..52f3ca57a239d1cdac5235f041ee33f906ff3905 100644 (file)
@@ -1,3 +1,7 @@
+2009-06-22  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf64-ppc.c (ppc64_elf_edit_opd): Avoid gcc warning.
+
 2009-06-19  H.J. Lu  <hongjiu.lu@intel.com>
 
        * elflink.c (elf_link_add_object_symbols): Avoid warning
index 04f21eeeaf379340d9a166192ebd27acf37eeb26..c3b211528fe3c3a17429b43ecb4f535dab637104 100644 (file)
@@ -6721,11 +6721,12 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info,
        {
          Elf_Internal_Rela *write_rel;
          bfd_byte *rptr, *wptr;
-         bfd_byte *new_contents = NULL;
+         bfd_byte *new_contents;
          bfd_boolean skip;
          long opd_ent_size;
          bfd_size_type amt;
 
+         new_contents = NULL;
          amt = sec->size * sizeof (long) / 8;
          opd = &ppc64_elf_section_data (sec)->u.opd;
          opd->adjust = bfd_zalloc (obfd, amt);