diff options
| author | Andrew Morton <akpm@osdl.org> | 2005-02-24 22:17:57 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-02-24 22:17:57 -0800 |
| commit | d6d29b7df443ac7057992ecb3aca88cba17431bb (patch) | |
| tree | 9884296411e30a31c0b53d7cae548a17a8584ec3 | |
| parent | 10d25b7654108f98c9b0cd69562903701d26410b (diff) | |
[PATCH] binfmt_elf build fix
The cast to void still triggers the gcc "warning: ignoring return value"
warning, which is dumb of it. So ignore the return value differently.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| -rw-r--r-- | fs/binfmt_elf.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index 1ba738d61470..3be133aa4a79 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c @@ -803,13 +803,14 @@ static int load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs) nbyte = ELF_MIN_ALIGN - nbyte; if (nbyte > elf_brk - elf_bss) nbyte = elf_brk - elf_bss; - /* - * This bss-zeroing can fail if the ELF file - * specifies odd protections. So we don't check - * the return value - */ - (void)clear_user((void __user *)elf_bss + - load_bias, nbyte); + if (clear_user((void __user *)elf_bss + + load_bias, nbyte)) { + /* + * This bss-zeroing can fail if the ELF + * file specifies odd protections. So + * we don't check the return value + */ + } } } |
