[apparmor] [patch] C tools: rename __unused macro

Steve Beattie steve at nxnw.org
Wed Oct 1 16:59:43 UTC 2014


On Tue, Sep 30, 2014 at 11:36:55AM -0700, John Johansen wrote:
> What do people think about using just the bare word?
>   unused

I'm fine with either the bare word or Cameron's AA_unused suggestion.

> Since the macro is not being exposed by a public header file the
> potential set of namespace collisions is limited to within apparmor
> it self, and we can deal with that.

That's only true so long as we can guarantee that nothing in libc,
gcc's/g++'s internal headers, or any other potential library we
consider linking internally with the parser implementation has a
symbol named 'unused' (or any of the future macros we're thinking
of defining), because that's what got us here in the first place,
expecting no one we import headers from to define a symbol named
'__unused'.

Yes, we should absolutely prevent such symbols from leaking to
consumers of apparmor, whether it be the current libapparmor library
or the planned but currently hypothetical libapparmor_parser.

-- 
Steve Beattie
<sbeattie at ubuntu.com>
http://NxNW.org/~steve/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20141001/03e20751/attachment.pgp>


More information about the AppArmor mailing list