Fix Compile Time Warnings: bfd/elf32-m68hc1x.c
Nick Clifton
nickc@redhat.com
Wed Feb 23 14:27:00 GMT 2005
More information about the Binutils mailing list
Wed Feb 23 14:27:00 GMT 2005
- Previous message (by thread): Fix Compile Time Warnings: bfd/elf32-cr16.c
- Next message (by thread): Fix Compile Time Warnings: bfd/elfxx-mips.c
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi Guys, gcc 4.0 is complaining about variables which are supposed to be initialised by being passed by reference to another function. A reasonable complaint, although one that might disappear if we were using -funit-at-a-time. Anyway the fix is simple so here goes. Cheers Nick bfd/ChangeLog 2005-02-23 Nick Clifton <nickc@redhat.com> * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Initialise variables that are passed by reference to m68hc11_get_relocation_value in case that function does not initialise them. Index: bfd/elf32-m68hc1x.c =================================================================== RCS file: /cvs/src/src/bfd/elf32-m68hc1x.c,v retrieving revision 1.18 diff -c -3 -p -r1.18 elf32-m68hc1x.c *** bfd/elf32-m68hc1x.c 21 Oct 2004 15:28:23 -0000 1.18 --- bfd/elf32-m68hc1x.c 23 Feb 2005 11:16:52 -0000 *************** elf32_m68hc11_relocate_section (bfd *out *** 1000,1006 **** Elf_Internal_Shdr *symtab_hdr; struct elf_link_hash_entry **sym_hashes; Elf_Internal_Rela *rel, *relend; ! const char *name; struct m68hc11_page_info *pinfo; const struct elf_backend_data * const ebd = get_elf_backend_data (input_bfd); --- 1000,1006 ---- Elf_Internal_Shdr *symtab_hdr; struct elf_link_hash_entry **sym_hashes; Elf_Internal_Rela *rel, *relend; ! const char *name = NULL; struct m68hc11_page_info *pinfo; const struct elf_backend_data * const ebd = get_elf_backend_data (input_bfd); *************** elf32_m68hc11_relocate_section (bfd *out *** 1021,1033 **** unsigned long r_symndx; Elf_Internal_Sym *sym; asection *sec; ! bfd_vma relocation; bfd_reloc_status_type r = bfd_reloc_undefined; bfd_vma phys_page; bfd_vma phys_addr; bfd_vma insn_addr; bfd_vma insn_page; ! bfd_boolean is_far; r_symndx = ELF32_R_SYM (rel->r_info); r_type = ELF32_R_TYPE (rel->r_info); --- 1021,1033 ---- unsigned long r_symndx; Elf_Internal_Sym *sym; asection *sec; ! bfd_vma relocation = 0; bfd_reloc_status_type r = bfd_reloc_undefined; bfd_vma phys_page; bfd_vma phys_addr; bfd_vma insn_addr; bfd_vma insn_page; ! bfd_boolean is_far = FALSE; r_symndx = ELF32_R_SYM (rel->r_info); r_type = ELF32_R_TYPE (rel->r_info);
- Previous message (by thread): Fix Compile Time Warnings: bfd/elf32-cr16.c
- Next message (by thread): Fix Compile Time Warnings: bfd/elfxx-mips.c
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list