[PATCH] x86, relocs: Fix a set-but-not-used warning

From: Kusanagi Kouichi
Date: Sat Apr 28 2012 - 04:48:42 EST


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@xxxxxxxxxxxxxxx>
---
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/