[apparmor] [PATCH v2 39/42] libapparmor: Add macro for the gcc "unused" attribute

John Johansen john.johansen at canonical.com
Thu Mar 12 12:07:10 UTC 2015


On 03/06/2015 01:48 PM, Tyler Hicks wrote:
> As code is moved from the parser to libapparmor, the libapparmor code
> base will need to have the "unused" macro defined. This macro will need
> to be duplicated in the parser and libapparmor due to it being a
> compiler-specific macro that shouldn't be exported from libapparmor.
> 
> Signed-off-by: Tyler Hicks <tyhicks at canonical.com>
Acked-by: John Johansen <john.johansen at canonical.com>

> ---
>  libraries/libapparmor/src/private.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/libraries/libapparmor/src/private.h b/libraries/libapparmor/src/private.h
> index 83813c4..e146a22 100644
> --- a/libraries/libapparmor/src/private.h
> +++ b/libraries/libapparmor/src/private.h
> @@ -23,6 +23,7 @@
>  #define autofree __attribute((cleanup(_aa_autofree)))
>  #define autoclose __attribute((cleanup(_aa_autoclose)))
>  #define autofclose __attribute((cleanup(_aa_autofclose)))
> +#define unused __attribute__ ((unused))
>  
>  #if ENABLE_DEBUG_OUTPUT
>  
> 




More information about the AppArmor mailing list