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  linux-hardening  linux-cve-announce  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:	Wed, 2 May 2007 00:17:04 -0700 (PDT)
From:	David Rientjes <rientjes@...gle.com>
To:	"Robert P. J. Day" <rpjday@...dspring.com>
cc:	Alexey Dobriyan <adobriyan@...il.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [patch 01/10] compiler: define __attribute_unused__

On Wed, 2 May 2007, Robert P. J. Day wrote:

>   not only that, but there are numerous files that *already* use
> "__unused":
> 
> $ grep -rw __unused *
> ... snip lots of output here ...
> 
> as well as a few files that can now have their definition of that
> removed:
> 
> $ grep -r "define __unused" *
> drivers/net/defxx.c:#define __unused __attribute__ ((unused))
> drivers/net/declance.c:#define __unused __attribute__ ((unused))
> drivers/misc/thinkpad_acpi.c:#define __unused __attribute__ ((unused))
> 
>   i think "__unused" is the clear choice here.
> 

No, it's not the clear choice.  This would apply to both functions and 
variables so the suppress a compiler warning for a variable whose use 
depends on preprocessor macros, I would have to use __unused even though 
it may be used.

Hence, I recommend __maybe_unused.
-
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ