]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
CC Attribute Test: cleanup. DO NOT INCLUDE IN PRODUCTION
authorMaria Matejka <mq@ucw.cz>
Thu, 26 Oct 2023 21:09:20 +0000 (23:09 +0200)
committerMaria Matejka <mq@ucw.cz>
Thu, 26 Oct 2023 21:09:20 +0000 (23:09 +0200)
lib/resource.c

index 89e559b4818a2ecae118e7e9b5370c6c05fedc65..7632dfff8eb68090eb3467eacec9b530f0ff30a7 100644 (file)
@@ -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;