Skip to content

Commit fb59ae5

Browse files
adrianreberavagin
authored andcommitted
test: fix GCC 16 compile error
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 <areber@redhat.com>
1 parent b208bec commit fb59ae5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/zdtm/static/uprobes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const char *test_author = "Shashank Balaji <shashank.mahadasyam@sony.com>";
3131
* compiler optimization) and use it (to prevent "unused variable" warning)
3232
*/
3333
void UPROBED_FUNCTION(void) {
34-
volatile int dummy = 0;
34+
volatile int dummy __maybe_unused = 0;
3535
dummy += 1;
3636
}
3737
/* Calling via volatile function pointer ensures noinline at callsite */

0 commit comments

Comments
 (0)