]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
memory_utils: make cleanup handler as unused
authorChristian Brauner <christian.brauner@ubuntu.com>
Wed, 11 Aug 2021 13:43:18 +0000 (15:43 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Wed, 11 Aug 2021 13:43:18 +0000 (15:43 +0200)
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>
src/lxc/memory_utils.h

index 7e4d0541f3842df969265ba63420ed9030e8af61..f2352a175f20a0d94af7bac581c4c8132d710bbb 100644 (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) {              \