[Devel] [PATCH vz10 09/15] selftests/mqueue: fix -Wunused-variable warning for 'usage' in mq_open_tests
Vasileios Almpanis
vasileios.almpanis at virtuozzo.com
Mon Mar 30 11:26:11 MSK 2026
Reviewed-by: Vasileios Almpanis <vasileios.almpanis at virtuozzo.com>
On 3/23/26 9:31 PM, Konstantin Khorenko wrote:
> 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>
>
> 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 9403ac01ba11..989b9b5d8ee5 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