This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
more -Wjump-misses-init fixes
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sourceware dot org
- Date: Mon, 22 Jun 2009 09:32:13 +0930
- Subject: more -Wjump-misses-init fixes
bfd/
* elf64-ppc.c (ppc64_elf_edit_opd): Avoid gcc warning.
opcodes/
* score-dis.c (print_insn_score48, print_insn_score32): Move default
case label to proper lexical block.
* score7-dis.c (print_insn_score32): Likewise.
Index: bfd/elf64-ppc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-ppc.c,v
retrieving revision 1.296
diff -u -p -r1.296 elf64-ppc.c
--- bfd/elf64-ppc.c 18 Jun 2009 14:18:29 -0000 1.296
+++ bfd/elf64-ppc.c 21 Jun 2009 11:17:37 -0000
@@ -6721,11 +6721,12 @@ ppc64_elf_edit_opd (bfd *obfd, struct bf
{
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);
Index: opcodes/score-dis.c
===================================================================
RCS file: /cvs/src/src/opcodes/score-dis.c,v
retrieving revision 1.5
diff -u -p -r1.5 score-dis.c
--- opcodes/score-dis.c 18 Mar 2009 16:58:33 -0000 1.5
+++ opcodes/score-dis.c 21 Jun 2009 11:18:10 -0000
@@ -646,10 +646,9 @@ print_insn_score48 (struct disassemble_i
abort ();
}
break;
-
- default:
- abort ();
}
+ default:
+ abort ();
}
}
else
@@ -854,10 +853,9 @@ print_insn_score32 (bfd_vma pc, struct d
abort ();
}
break;
-
- default:
- abort ();
}
+ default:
+ abort ();
}
}
else
Index: opcodes/score7-dis.c
===================================================================
RCS file: /cvs/src/src/opcodes/score7-dis.c,v
retrieving revision 1.1
diff -u -p -r1.1 score7-dis.c
--- opcodes/score7-dis.c 2 Mar 2009 10:33:08 -0000 1.1
+++ opcodes/score7-dis.c 21 Jun 2009 11:18:10 -0000
@@ -678,10 +678,9 @@ print_insn_score32 (bfd_vma pc, struct d
abort ();
}
break;
-
- default:
- abort ();
}
+ default:
+ abort ();
}
}
else
--
Alan Modra
Australia Development Lab, IBM