lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 3 May 2007 19:51:26 +0200
From:	Adrian Bunk <bunk@...sta.de>
To:	David Rientjes <rientjes@...gle.com>
Cc:	Rusty Russell <rusty@...tcorp.com.au>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [patch 01/10] compiler: define __attribute_unused__

On Wed, May 02, 2007 at 10:16:15AM -0700, David Rientjes wrote:
> 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 

This is only about static code. For non-static code it would be
impossible for gcc to issue warnings.

> 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.

But looking at a kernel build it seems there are far few warnings than I 
remembered, so it might actually be possible to annotate all code 
accordingly.

> 		David

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

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

Powered by blists - more mailing lists