From 130e99db590073dd58da7e5c32dec8c2181527dd Mon Sep 17 00:00:00 2001 From: Conor Walsh Date: Mon, 15 Nov 2021 17:58:55 +0000 Subject: [PATCH] examples/performance-thread: remove unused hits count Reported by clang 13. This patch removes the hits variable from the cpu_load_collector function within the performance thread example app as it is an unused but set variable. Bugzilla ID: 881 Fixes: d48415e1fee3 ("examples/performance-thread: add l3fwd-thread app") Cc: stable@dpdk.org Reported-by: Liang Longfeng Signed-off-by: Conor Walsh Reviewed-by: David Marchand --- examples/performance-thread/l3fwd-thread/main.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/examples/performance-thread/l3fwd-thread/main.c b/examples/performance-thread/l3fwd-thread/main.c index 3a6a33bda3b..8a350405976 100644 --- a/examples/performance-thread/l3fwd-thread/main.c +++ b/examples/performance-thread/l3fwd-thread/main.c @@ -1885,7 +1885,6 @@ process_burst(struct rte_mbuf *pkts_burst[MAX_PKT_BURST], int nb_rx, static int __rte_noreturn cpu_load_collector(__rte_unused void *arg) { unsigned i, j, k; - uint64_t hits; uint64_t prev_tsc, diff_tsc, cur_tsc; uint64_t total[MAX_CPU] = { 0 }; unsigned min_cpu = MAX_CPU; @@ -1972,12 +1971,10 @@ cpu_load_collector(__rte_unused void *arg) { printf("cpu# proc%% poll%% overhead%%\n\n"); for (i = min_cpu; i <= max_cpu; i++) { - hits = 0; printf("CPU %d:", i); for (j = 0; j < MAX_CPU_COUNTER; j++) { printf("%7" PRIu64 "", cpu_load.hits[j][i] * 100 / cpu_load.counter); - hits += cpu_load.hits[j][i]; cpu_load.hits[j][i] = 0; } printf("%7" PRIu64 "\n",