From fb59ae504e90edf08c133b4d2d938f645421c396 Mon Sep 17 00:00:00 2001 From: Adrian Reber Date: Fri, 9 Jan 2026 08:15:05 +0000 Subject: [PATCH] test: fix GCC 16 compile error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fedora rawhide ships a pre-release of GCC 16 which produces following error: uprobes.c:34:22: error: variable ‘dummy’ set but not used [-Werror=unused-but-set-variable=] 34 | volatile int dummy = 0; | ^~~~~ Marking this variable as "__maybe_unused" to fix the error. Signed-off-by: Adrian Reber --- test/zdtm/static/uprobes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/zdtm/static/uprobes.c b/test/zdtm/static/uprobes.c index 4164375b7..6ef9a56bc 100644 --- a/test/zdtm/static/uprobes.c +++ b/test/zdtm/static/uprobes.c @@ -31,7 +31,7 @@ const char *test_author = "Shashank Balaji "; * compiler optimization) and use it (to prevent "unused variable" warning) */ void UPROBED_FUNCTION(void) { - volatile int dummy = 0; + volatile int dummy __maybe_unused = 0; dummy += 1; } /* Calling via volatile function pointer ensures noinline at callsite */