[Devel] [PATCH RHEL10 COMMIT] selftests/mqueue: fix -Wunused-variable warning for 'usage' in mq_open_tests
Konstantin Khorenko
khorenko at virtuozzo.com
Tue Mar 31 23:33:55 MSK 2026
The commit is pushed to "branch-rh10-6.12.0-55.52.1.4.x.vz10-ovz" and will appear at git at bitbucket.org:openvz/vzkernel.git
after rh10-6.12.0-55.52.1.4.12.vz10
------>
commit cd1aea2748fd8e832d0dca878b0c5ccdd2d699fa
Author: Konstantin Khorenko <khorenko at virtuozzo.com>
Date: Mon Mar 23 21:31:28 2026 +0100
selftests/mqueue: fix -Wunused-variable warning for 'usage' in mq_open_tests
mq_open_tests.c:38:14: warning: 'usage' defined but not used [-Wunused-variable]
38 | static char *usage =
| ^~~~~
Mark 'usage' with __attribute__((unused)) to fix the warning.
The variable is kept for documentation purposes.
https://virtuozzo.atlassian.net/browse/VSTOR-127529
Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
Reviewed-by: Vasileios Almpanis <vasileios.almpanis at virtuozzo.com>
Feature: fix selftests
---
tools/testing/selftests/mqueue/mq_open_tests.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/mqueue/mq_open_tests.c b/tools/testing/selftests/mqueue/mq_open_tests.c
index 9403ac01ba11d..989b9b5d8ee56 100644
--- a/tools/testing/selftests/mqueue/mq_open_tests.c
+++ b/tools/testing/selftests/mqueue/mq_open_tests.c
@@ -35,7 +35,7 @@
#include "../kselftest.h"
-static char *usage =
+static char __attribute__((unused)) *usage =
"Usage:\n"
" %s path\n"
"\n"
More information about the Devel
mailing list