From c9c253d3729d24bff73ba4094bff386ec54a8cf1 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 20 Nov 2012 00:00:35 +0000 Subject: [PATCH] Fix unused-variable warnings from MIPS RESOLVE_GOTSYM macro. --- ports/ChangeLog.mips | 3 +++ ports/sysdeps/mips/dl-machine.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ports/ChangeLog.mips b/ports/ChangeLog.mips index 92b3e2f992..7472aa3c7c 100644 --- a/ports/ChangeLog.mips +++ b/ports/ChangeLog.mips @@ -1,5 +1,8 @@ 2012-11-19 Joseph Myers + * sysdeps/mips/dl-machine.h (RESOLVE_GOTSYM): Declare VERSION + variable with __attribute__ ((unused)). + * sysdeps/unix/sysv/linux/mips/mips32/sysdep.h (INTERNAL_SYSCALL_DECL): Use __attribute__ ((unused)). (INTERNAL_SYSCALL_ERROR_P): Cast val to void. diff --git a/ports/sysdeps/mips/dl-machine.h b/ports/sysdeps/mips/dl-machine.h index cc7da7625c..9b970a26ed 100644 --- a/ports/sysdeps/mips/dl-machine.h +++ b/ports/sysdeps/mips/dl-machine.h @@ -637,7 +637,7 @@ elf_machine_got_rel (struct link_map *map, int lazy) #define RESOLVE_GOTSYM(sym,vernum,sym_index,reloc) \ ({ \ const ElfW(Sym) *ref = sym; \ - const struct r_found_version *version \ + const struct r_found_version *version __attribute__ ((unused)) \ = vernum ? &map->l_versions[vernum[sym_index] & 0x7fff] : NULL; \ struct link_map *sym_map; \ sym_map = RESOLVE_MAP (&ref, version, reloc); \ -- 2.43.5