* [PATCH 0/2] selftests/mqueue: fix compilation warnings
@ 2026-05-24 19:07 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 ` [PATCH 2/2] selftests/mqueue: fix -Wunused-variable warning for 'usage' in mq_open_tests Eva Kurchatova
0 siblings, 2 replies; 3+ messages in thread
From: Eva Kurchatova @ 2026-05-24 19:07 UTC (permalink / raw)
To: shuah, brauner; +Cc: linux-kselftest, linux-kernel, eva.kurchatova, khorenko
This patchset fixes warnings about unused but initialized variables.
Konstantin Khorenko (2):
selftests/mqueue: fix warnings in mq_perf_tests
selftests/mqueue: fix -Wunused-variable warning for 'usage' in
mq_open_tests
tools/testing/selftests/mqueue/mq_open_tests.c | 2 +-
tools/testing/selftests/mqueue/mq_perf_tests.c | 4 +---
2 files changed, 2 insertions(+), 4 deletions(-)
--
2.54.0
^ permalink raw reply [flat|nested] 3+ messages in thread* [PATCH 1/2] selftests/mqueue: fix warnings in mq_perf_tests
2026-05-24 19:07 [PATCH 0/2] selftests/mqueue: fix compilation warnings Eva Kurchatova
@ 2026-05-24 19:07 ` Eva Kurchatova
2026-05-24 19:07 ` [PATCH 2/2] selftests/mqueue: fix -Wunused-variable warning for 'usage' in mq_open_tests Eva Kurchatova
1 sibling, 0 replies; 3+ messages in thread
From: Eva Kurchatova @ 2026-05-24 19:07 UTC (permalink / raw)
To: shuah, brauner; +Cc: linux-kselftest, linux-kernel, eva.kurchatova, khorenko
From: Konstantin Khorenko <khorenko@virtuozzo.com>
mq_perf_tests.c: In function 'perf_test_thread':
mq_perf_tests.c:433:20: warning: variable 't' set but not used
[-Wunused-but-set-variable]
433 | pthread_t *t;
| ^
mq_perf_tests.c: At top level:
mq_perf_tests.c:45:14: warning: 'usage' defined but not used
[-Wunused-variable]
45 | static char *usage =
| ^~~~~
- Mark 'usage' with __attribute__((unused)) to fix -Wunused-variable.
- Remove unused variable 't' to fix -Wunused-but-set-variable.
Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
---
tools/testing/selftests/mqueue/mq_perf_tests.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/tools/testing/selftests/mqueue/mq_perf_tests.c b/tools/testing/selftests/mqueue/mq_perf_tests.c
index 303c46eebd94..a13378464551 100644
--- a/tools/testing/selftests/mqueue/mq_perf_tests.c
+++ b/tools/testing/selftests/mqueue/mq_perf_tests.c
@@ -42,7 +42,7 @@
#include "kselftest.h"
-static char *usage =
+static char __attribute__((unused)) *usage =
"Usage:\n"
" %s [-c #[,#..] -f] path\n"
"\n"
@@ -430,12 +430,10 @@ void *perf_test_thread(void *arg)
unsigned int prio_in;
int i;
clockid_t clock;
- pthread_t *t;
struct timespec res, start, middle, end, send_total, recv_total;
unsigned long long nsec;
struct test *cur_test;
- t = &cpu_threads[0];
printf("\n\tStarted mqueue performance test thread on CPU %d\n",
cpus_to_pin[0]);
mq_prio_max = sysconf(_SC_MQ_PRIO_MAX);
--
2.54.0
^ permalink raw reply [flat|nested] 3+ messages in thread* [PATCH 2/2] selftests/mqueue: fix -Wunused-variable warning for 'usage' in mq_open_tests
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
1 sibling, 0 replies; 3+ messages in thread
From: Eva Kurchatova @ 2026-05-24 19:07 UTC (permalink / raw)
To: shuah, brauner; +Cc: linux-kselftest, linux-kernel, eva.kurchatova, khorenko
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-05-24 19:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH 2/2] selftests/mqueue: fix -Wunused-variable warning for 'usage' in mq_open_tests Eva Kurchatova
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®