All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kusanagi Kouichi <slash@ac.auone-net.jp>
To: "H. Peter Anvin" <hpa@zytor.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>,
	x86@kernel.org, Matt Fleming <matt.fleming@intel.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH] x86, relocs: Fix a set-but-not-used warning
Date: Sat, 28 Apr 2012 17:48:42 +0900	[thread overview]
Message-ID: <20120428084843.6982962C03E@msa106.auone-net.jp> (raw)

Fix this warning for x86-32 relocatable kernel:

arch/x86/boot/compressed/relocs.c: In function 'print_absolute_symbols':
arch/x86/boot/compressed/relocs.c:406:14: warning: variable 'sh_symtab' set but not used [-Wunused-but-set-variable]

Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp>
---
 arch/x86/boot/compressed/relocs.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/boot/compressed/relocs.c b/arch/x86/boot/compressed/relocs.c
index d3c0b02..57c563d 100644
--- a/arch/x86/boot/compressed/relocs.c
+++ b/arch/x86/boot/compressed/relocs.c
@@ -414,7 +414,7 @@ static void print_absolute_symbols(void)
 		for (j = 0; j < sec->shdr.sh_size/sizeof(Elf32_Sym); j++) {
 			Elf32_Sym *sym;
 			const char *name;
-			sym = &sec->symtab[j];
+			sym = &sh_symtab[j];
 			name = sym_name(sym_strtab, sym);
 			if (sym->st_shndx != SHN_ABS) {
 				continue;
-- 
1.7.10


                 reply	other threads:[~2012-04-28  8:48 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=20120428084843.6982962C03E@msa106.auone-net.jp \
    --to=slash@ac.auone-net.jp \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt.fleming@intel.com \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.