public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Fixing compile time warnings: bfd/elf.c
@ 2005-02-23 13:45 Nick Clifton
  0 siblings, 0 replies; only message in thread
From: Nick Clifton @ 2005-02-23 13:45 UTC (permalink / raw)
  To: binutils

Hi Guys,

  I have now built and installed a gcc 4.0 compiler and started to use
  it to compile binutils with -Werror enabled.  I am hoping to get
  round to fixing the cgen originated problems found by Alan, but
  first up is a small fix to elf.c to remove a "variable might be used
  before it is initialised warning."

Cheers
  Nick

bfd/elf.c
2005-02-23  Nick Clifton  <nickc@redhat.com>

	* elf.c (_bfd_elf_compute_section_file_positions): Initialise
	strtab to avoid compile time warning.

Index: bfd/elf.c
===================================================================
RCS file: /cvs/src/src/bfd/elf.c,v
retrieving revision 1.266
diff -c -3 -p -r1.266 elf.c
*** bfd/elf.c	20 Feb 2005 14:59:06 -0000	1.266
--- bfd/elf.c	23 Feb 2005 09:45:46 -0000
*************** _bfd_elf_compute_section_file_positions 
*** 3233,3239 ****
  {
    const struct elf_backend_data *bed = get_elf_backend_data (abfd);
    bfd_boolean failed;
!   struct bfd_strtab_hash *strtab;
    Elf_Internal_Shdr *shstrtab_hdr;
  
    if (abfd->output_has_begun)
--- 3233,3239 ----
  {
    const struct elf_backend_data *bed = get_elf_backend_data (abfd);
    bfd_boolean failed;
!   struct bfd_strtab_hash *strtab = NULL;
    Elf_Internal_Shdr *shstrtab_hdr;
  
    if (abfd->output_has_begun)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-02-23  9:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-23 13:45 Fixing compile time warnings: bfd/elf.c Nick Clifton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).