[apparmor] [PATCH 09/12] libapparmor: Add macro for the gcc "unused" attribute

Tyler Hicks tyhicks at canonical.com
Wed Dec 10 22:12:30 UTC 2014


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>
---
 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 2ef3088..30fdba0 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))
 
 void atomic_inc(unsigned int *v);
 bool atomic_dec_and_test(unsigned int *v);
-- 
2.1.0




More information about the AppArmor mailing list