From 5cbe62f6a4026f0c668c2f84a6bc239f52503c33 Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Thu, 9 Nov 2023 22:21:58 +0100 Subject: [PATCH] fixup: marked the checks as unused to tame some warnings --- lib/attribute_cleanup_test.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/attribute_cleanup_test.c b/lib/attribute_cleanup_test.c index 31b8cf09..4c71b6b3 100644 --- a/lib/attribute_cleanup_test.c +++ b/lib/attribute_cleanup_test.c @@ -24,19 +24,19 @@ tacd_aux(int pos) { CHECK(pos + 0); - __attribute__((cleanup(tacd_cleanup))) int upmost = pos + 18; + UNUSED __attribute__((cleanup(tacd_cleanup))) int upmost = pos + 18; if (order_pos > 0) { CHECK(pos + 1); - __attribute__((cleanup(tacd_cleanup))) int inner_if = pos + 3; + UNUSED __attribute__((cleanup(tacd_cleanup))) int inner_if = pos + 3; CHECK(pos + 2); } for (int i=0; i<3; i++) { CHECK(pos + 4 + 3*i); - __attribute__((cleanup(tacd_cleanup))) int inner_for = pos + 6 + 3*i; + UNUSED __attribute__((cleanup(tacd_cleanup))) int inner_for = pos + 6 + 3*i; CHECK(pos + 5 + 3*i); } @@ -45,7 +45,7 @@ tacd_aux(int pos) i < pos + 16; i++) { CHECK(pos + 13); - __attribute__((cleanup(tacd_cleanup))) int inner_for = pos + 15; + UNUSED __attribute__((cleanup(tacd_cleanup))) int inner_for = pos + 15; CHECK(pos + 14); } @@ -63,7 +63,7 @@ t_attribute_cleanup_direct(void) for (int i=0; i<3; i++) { CHECK(i*(CHECKCNT+3) + 1); - __attribute__((cleanup(tacd_cleanup))) int inner_for = (i+1) * (CHECKCNT+3); + UNUSED __attribute__((cleanup(tacd_cleanup))) int inner_for = (i+1) * (CHECKCNT+3); tacd_aux(i*(CHECKCNT+3) + 2); CHECK((i+1) * (CHECKCNT+3) - 1); }