]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
binfmt_elf: quiet GCC-4.6 'set but not used' warning in load_elf_binary()
authorDavid Daney <ddaney@caviumnetworks.com>
Tue, 22 Mar 2011 23:34:48 +0000 (16:34 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 23 Mar 2011 00:44:15 +0000 (17:44 -0700)
With GCC-4.6 we get warnings about things being 'set but not used'.

In load_elf_binary() this can happen with reloc_func_desc if ELF_PLAT_INIT
is defined, but doesn't use the reloc_func_desc argument.

Quiet the warning/error by marking reloc_func_desc as __maybe_unused.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/binfmt_elf.c

index d5b640ba6cb1a30ab06adc214e76ae37f2b1ec75..b2fae009a4b7a65c225bf109453fe316baa09166 100644 (file)
@@ -570,7 +570,7 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
        unsigned long elf_entry;
        unsigned long interp_load_addr = 0;
        unsigned long start_code, end_code, start_data, end_data;
-       unsigned long reloc_func_desc = 0;
+       unsigned long reloc_func_desc __maybe_unused = 0;
        int executable_stack = EXSTACK_DEFAULT;
        unsigned long def_flags = 0;
        struct {