From: Christian Brauner Date: Wed, 11 Aug 2021 13:43:18 +0000 (+0200) Subject: memory_utils: make cleanup handler as unused X-Git-Tag: lxc-5.0.0~115^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f7050a2d874f78a7f5599e2743a2b61c6f3c78fc;p=thirdparty%2Flxc.git memory_utils: make cleanup handler as unused They are sometimes used to just clean something up automatically at end of scope but the variables themselves might not be actually used. Signed-off-by: Christian Brauner --- diff --git a/src/lxc/memory_utils.h b/src/lxc/memory_utils.h index 7e4d0541f..f2352a175 100644 --- a/src/lxc/memory_utils.h +++ b/src/lxc/memory_utils.h @@ -20,7 +20,8 @@ cleaner(*ptr); \ } -#define call_cleaner(cleaner) __attribute__((__cleanup__(cleaner##_function))) +#define call_cleaner(cleaner) \ + __attribute__((__cleanup__(cleaner##_function))) __attribute__((unused)) #define close_prot_errno_disarm(fd) \ if (fd >= 0) { \