Messages in this thread | | | Subject | Ignored return value of __clear_user in fs/binfmt_elf.c? | Date | Wed, 23 Feb 2005 14:27:24 -0300 | From | Horst von Brand <> |
| |
Machine is sparc64, bk of today, gcc-3.4.2-6.fc3 (Aurora Corona). First 2.6 I try to build here, so it might be something known.
Build fails due to -Werror with:
include/asm/uaccess.h: In function `load_elf_binary': arch/sparc64/kernel/../../../fs/binfmt_elf.c:811: warning: ignoring return value of `__clear_user', declared with attribute warn_unused_result
Around line 811 of fs/binfmt_elf.c I see:
/* * 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);
so presumably this discarding is OK here...
I wonder why an explicit (void) cast is not considered "use" by the compiler. But then again, explicitly throwing away isn't really "use"... -- Dr. Horst H. von Brand User #22616 counter.li.org Departamento de Informatica Fono: +56 32 654431 Universidad Tecnica Federico Santa Maria +56 32 654239 Casilla 110-V, Valparaiso, Chile Fax: +56 32 797513 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |