From 70a590636b4fcb0818233c65c92163254140a2fd Mon Sep 17 00:00:00 2001 From: Nelson Chu Date: Tue, 6 Jul 2021 17:27:22 +0800 Subject: [PATCH] RISC-V: Fix the build broken with -Werror. ChangeLog: bfd/ * elfnn-riscv.c(riscv_elf_additional_program_headers): Removed the unused variable s. (riscv_elf_modify_segment_map): Added ATTRIBUTE_UNUSED for the unused parameter info. --- bfd/elfnn-riscv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bfd/elfnn-riscv.c b/bfd/elfnn-riscv.c index 4db3ca4e4b9..2dfa6351337 100644 --- a/bfd/elfnn-riscv.c +++ b/bfd/elfnn-riscv.c @@ -5164,7 +5164,6 @@ static int riscv_elf_additional_program_headers (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED) { - asection *s; int ret = 0; /* See if we need a PT_RISCV_ATTRIBUTES segment. */ @@ -5176,7 +5175,7 @@ riscv_elf_additional_program_headers (bfd *abfd, static bool riscv_elf_modify_segment_map (bfd *abfd, - struct bfd_link_info *info) + struct bfd_link_info *info ATTRIBUTE_UNUSED) { asection *s; struct elf_segment_map *m, **pm; -- 2.30.2