This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fixing compile time warnings: bfd/elf.c


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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]