From: Christian Brauner Date: Sat, 7 Dec 2019 16:38:42 +0000 (+0100) Subject: compiler: add __unused attribute X-Git-Tag: lxc-4.0.0~78^2~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1a080cd740c4fc4a6a9dd6136b2acc2dfa1c4802;p=thirdparty%2Flxc.git compiler: add __unused attribute Signed-off-by: Christian Brauner --- diff --git a/src/lxc/compiler.h b/src/lxc/compiler.h index e8adf37c4..2774c6334 100644 --- a/src/lxc/compiler.h +++ b/src/lxc/compiler.h @@ -45,6 +45,13 @@ #define __returns_twice __attribute__((returns_twice)) #endif +/* This attribute is required to silence clang warnings */ +#if defined(__GNUC__) +#define __unused __attribute__ ((unused)) +#else +#define __unused +#endif + #define __cgfsng_ops #endif /* __LXC_COMPILER_H */