* Fix unused-variable warnings from MIPS RESOLVE_GOTSYM macro
@ 2012-11-20 0:01 Joseph S. Myers
0 siblings, 0 replies; only message in thread
From: Joseph S. Myers @ 2012-11-20 0:01 UTC (permalink / raw)
To: libc-ports
Building for MIPS produces warnings about the variable "version" in
the RESOLVE_GOTSYM macro being unused when building dl-conflict.c,
where RESOLVE_MAP is defined with a definition that doesn't use that
macro argument. I've applied this patch to fix these warnings by
using __attribute__ ((unused)) on that variable.
2012-11-19 Joseph Myers <joseph@codesourcery.com>
* sysdeps/mips/dl-machine.h (RESOLVE_GOTSYM): Declare VERSION
variable with __attribute__ ((unused)).
diff --git a/ports/sysdeps/mips/dl-machine.h b/ports/sysdeps/mips/dl-machine.h
index cc7da76..9b970a2 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); \
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-11-20 0:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-20 0:01 Fix unused-variable warnings from MIPS RESOLVE_GOTSYM macro Joseph S. Myers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).