mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
To: shuah@kernel.org, brauner@kernel.org
Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
	eva.kurchatova@virtuozzo.com, khorenko@virtuozzo.com
Subject: [PATCH 2/2] selftests/mqueue: fix -Wunused-variable warning for 'usage' in mq_open_tests
Date: Sun, 24 May 2026 22:07:13 +0300	[thread overview]
Message-ID: <20260524190844.46196-3-eva.kurchatova@virtuozzo.com> (raw)
In-Reply-To: <20260524190844.46196-1-eva.kurchatova@virtuozzo.com>

From: Konstantin Khorenko <khorenko@virtuozzo.com>

  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.

Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
---
 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 b16029c40c0f..f7955507917b 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"
-- 
2.54.0


      parent reply	other threads:[~2026-05-24 19:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-24 19:07 [PATCH 0/2] selftests/mqueue: fix compilation warnings Eva Kurchatova
2026-05-24 19:07 ` [PATCH 1/2] selftests/mqueue: fix warnings in mq_perf_tests Eva Kurchatova
2026-05-24 19:07 ` Eva Kurchatova [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260524190844.46196-3-eva.kurchatova@virtuozzo.com \
    --to=eva.kurchatova@virtuozzo.com \
    --cc=brauner@kernel.org \
    --cc=khorenko@virtuozzo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®