mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-09-10 03:42:22 +08:00
fix set but unused variable warnings
This commit is contained in:
@ -1204,7 +1204,7 @@ elf32_avr_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
|
||||
|
||||
r_type = ELF32_R_TYPE (rel->r_info);
|
||||
r_symndx = ELF32_R_SYM (rel->r_info);
|
||||
howto = elf_avr_howto_table + ELF32_R_TYPE (rel->r_info);
|
||||
howto = elf_avr_howto_table + r_type;
|
||||
h = NULL;
|
||||
sym = NULL;
|
||||
sec = NULL;
|
||||
@ -1431,7 +1431,6 @@ elf32_avr_relax_delete_bytes (bfd *abfd,
|
||||
unsigned int sec_shndx;
|
||||
bfd_byte *contents;
|
||||
Elf_Internal_Rela *irel, *irelend;
|
||||
Elf_Internal_Rela *irelalign;
|
||||
Elf_Internal_Sym *isym;
|
||||
Elf_Internal_Sym *isymbuf = NULL;
|
||||
bfd_vma toaddr;
|
||||
@ -1443,10 +1442,6 @@ elf32_avr_relax_delete_bytes (bfd *abfd,
|
||||
sec_shndx = _bfd_elf_section_from_bfd_section (abfd, sec);
|
||||
contents = elf_section_data (sec)->this_hdr.contents;
|
||||
|
||||
/* The deletion must stop at the next ALIGN reloc for an aligment
|
||||
power larger than the number of bytes we are deleting. */
|
||||
|
||||
irelalign = NULL;
|
||||
toaddr = sec->size;
|
||||
|
||||
irel = elf_section_data (sec)->relocs;
|
||||
@ -1462,12 +1457,9 @@ elf32_avr_relax_delete_bytes (bfd *abfd,
|
||||
for (irel = elf_section_data (sec)->relocs; irel < irelend; irel++)
|
||||
{
|
||||
bfd_vma old_reloc_address;
|
||||
bfd_vma shrinked_insn_address;
|
||||
|
||||
old_reloc_address = (sec->output_section->vma
|
||||
+ sec->output_offset + irel->r_offset);
|
||||
shrinked_insn_address = (sec->output_section->vma
|
||||
+ sec->output_offset + addr - count);
|
||||
|
||||
/* Get the new reloc address. */
|
||||
if ((irel->r_offset > addr
|
||||
@ -1648,8 +1640,6 @@ elf32_avr_relax_section (bfd *abfd,
|
||||
Elf_Internal_Rela *irel, *irelend;
|
||||
bfd_byte *contents = NULL;
|
||||
Elf_Internal_Sym *isymbuf = NULL;
|
||||
static asection *last_input_section = NULL;
|
||||
static Elf_Internal_Rela *last_reloc = NULL;
|
||||
struct elf32_avr_link_hash_table *htab;
|
||||
|
||||
if (link_info->relocatable)
|
||||
@ -1709,11 +1699,6 @@ elf32_avr_relax_section (bfd *abfd,
|
||||
if (internal_relocs == NULL)
|
||||
goto error_return;
|
||||
|
||||
if (sec != last_input_section)
|
||||
last_reloc = NULL;
|
||||
|
||||
last_input_section = sec;
|
||||
|
||||
/* Walk through the relocs looking for relaxing opportunities. */
|
||||
irelend = internal_relocs + sec->reloc_count;
|
||||
for (irel = internal_relocs; irel < irelend; irel++)
|
||||
@ -2509,12 +2494,10 @@ avr_build_one_stub (struct bfd_hash_entry *bh, void *in_arg)
|
||||
|
||||
static bfd_boolean
|
||||
avr_mark_stub_not_to_be_necessary (struct bfd_hash_entry *bh,
|
||||
void *in_arg)
|
||||
void *in_arg ATTRIBUTE_UNUSED)
|
||||
{
|
||||
struct elf32_avr_stub_hash_entry *hsh;
|
||||
struct elf32_avr_link_hash_table *htab;
|
||||
|
||||
htab = in_arg;
|
||||
hsh = avr_stub_hash_entry (bh);
|
||||
hsh->is_actually_needed = FALSE;
|
||||
|
||||
|
Reference in New Issue
Block a user