From f7050a2d874f78a7f5599e2743a2b61c6f3c78fc Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Wed, 11 Aug 2021 15:43:18 +0200 Subject: [PATCH] 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 --- src/lxc/memory_utils.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) { \ -- 2.47.2