2
0
mirror of git://github.com/lxc/lxc synced 2025-08-31 14:24:15 +00:00

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 <christian.brauner@ubuntu.com>
This commit is contained in:
Christian Brauner
2021-08-11 15:43:18 +02:00
parent d5b6db61e2
commit f7050a2d87

View File

@@ -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) { \