This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
bfd warning fixes
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sources dot redhat dot com
- Date: Thu, 17 Feb 2005 23:07:35 +1030
- Subject: bfd warning fixes
Fixes gcc-4.0 fussing about possible use of an uninitialized struct
component.
bfd/
* elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Fix warning.
Index: bfd/elf-eh-frame.c
===================================================================
RCS file: /cvs/src/src/bfd/elf-eh-frame.c,v
retrieving revision 1.42
diff -u -p -r1.42 elf-eh-frame.c
--- bfd/elf-eh-frame.c 31 Jan 2005 20:39:08 -0000 1.42
+++ bfd/elf-eh-frame.c 17 Feb 2005 11:14:19 -0000
@@ -482,6 +482,7 @@ _bfd_elf_discard_section_eh_frame
on whether to output or discard last encountered CIE (if any). */
if ((bfd_size_type) (buf - ehbuf) == sec->size)
{
+ hdr.length = 0;
hdr.id = (unsigned int) -1;
end = buf;
}
--
Alan Modra
IBM OzLabs - Linux Technology Centre