From: Maria Matejka Date: Thu, 26 Oct 2023 21:09:20 +0000 (+0200) Subject: CC Attribute Test: cleanup. DO NOT INCLUDE IN PRODUCTION X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d6241b24a2ff91624eeffc66005fb7ad273b6d68;p=thirdparty%2Fbird.git CC Attribute Test: cleanup. DO NOT INCLUDE IN PRODUCTION --- diff --git a/lib/resource.c b/lib/resource.c index 89e559b48..7632dfff8 100644 --- a/lib/resource.c +++ b/lib/resource.c @@ -274,6 +274,12 @@ rlookup(unsigned long a) debug("Not found.\n"); } +static void +my_check(int *whatever UNUSED) +{ + printf("Everything works well.\n"); +} + /** * resource_init - initialize the resource manager * @@ -284,6 +290,7 @@ rlookup(unsigned long a) void resource_init(void) { + __attribute__((cleanup(my_check))) int test = 42; resource_sys_init(); root_pool.r.class = &pool_class;