On Wed, 2 May 2007, Adrian Bunk wrote: > If we don't want any warnings with CONFIG_PCI=n, CONFIG_SYSFS=n or > CONFIG_PROC_FS=n, we'd have to annotate _many_ functions. > > If the lonterm goal is to compile the kernel with -Werror then we need > -Wno-unused-function, not annotating individual functions. > That's only addressing part of the issue. What about automatic or static external variables that are declared but may go unreferenced depending on preprocessor macros? You need to annotate them with __attribute__ ((unused)) to suppress compiler warnings. Globally disabling such warnings would eventually cause unused code to go unnoticed. David - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [patch 01/10] compiler: define __attribute_unused__
- From: Adrian Bunk <[email protected]>
- Re: [patch 01/10] compiler: define __attribute_unused__
- References:
- [patch 01/10] compiler: define __attribute_unused__
- From: David Rientjes <[email protected]>
- Re: [patch 01/10] compiler: define __attribute_unused__
- From: Rusty Russell <[email protected]>
- Re: [patch 01/10] compiler: define __attribute_unused__
- From: David Rientjes <[email protected]>
- Re: [patch 01/10] compiler: define __attribute_unused__
- From: Rusty Russell <[email protected]>
- Re: [patch 01/10] compiler: define __attribute_unused__
- From: David Rientjes <[email protected]>
- Re: [patch 01/10] compiler: define __attribute_unused__
- From: Rusty Russell <[email protected]>
- Re: [patch 01/10] compiler: define __attribute_unused__
- From: David Rientjes <[email protected]>
- Re: [patch 01/10] compiler: define __attribute_unused__
- From: Adrian Bunk <[email protected]>
- Re: [patch 01/10] compiler: define __attribute_unused__
- From: Adrian Bunk <[email protected]>
- [patch 01/10] compiler: define __attribute_unused__
- Prev by Date: Re: regression on quad Xeon: no SCSI-disks
- Next by Date: Re: [RFC BUG?] dereference PAGE_OFFSET address (rc7-mm2)
- Previous by thread: Re: [patch 01/10] compiler: define __attribute_unused__
- Next by thread: Re: [patch 01/10] compiler: define __attribute_unused__
- Index(es):