From: Konstantin Khorenko <[email protected]>

  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 <[email protected]>
---
 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


Reply via email to