From: "Joseph S. Myers" <joseph@codesourcery.com>
To: <libc-ports@sourceware.org>
Subject: Fix unused-variable warnings from MIPS RESOLVE_GOTSYM macro
Date: Tue, 20 Nov 2012 00:01:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.64.1211200000580.26267@digraph.polyomino.org.uk> (raw)
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
reply other threads:[~2012-11-20 0:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.1211200000580.26267@digraph.polyomino.org.uk \
--to=joseph@codesourcery.com \
--cc=libc-ports@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).