This patch fixes unused but set variables within the following test apps: - test distributor perf - test thash perf
Bugzilla ID: 881 Fixes: c0de0eb82e40 ("distributor: switch over to new API") Fixes: 239fffe0402e ("test/thash: add performance tests for Toeplitz hash") Signed-off-by: Conor Walsh <conor.wa...@intel.com> Reported-by: Liang Longfeng <longfengx.li...@intel.com> --- app/test/test_distributor_perf.c | 3 --- app/test/test_thash_perf.c | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/test/test_distributor_perf.c b/app/test/test_distributor_perf.c index fdbeae6d2f..92e330f194 100644 --- a/app/test/test_distributor_perf.c +++ b/app/test/test_distributor_perf.c @@ -108,7 +108,6 @@ static int handle_work(void *arg) { struct rte_distributor *d = arg; - unsigned int count = 0; unsigned int num = 0; int i; unsigned int id = __atomic_fetch_add(&worker_idx, 1, __ATOMIC_RELAXED); @@ -120,11 +119,9 @@ handle_work(void *arg) num = rte_distributor_get_pkt(d, id, buf, buf, num); while (!quit) { worker_stats[id].handled_packets += num; - count += num; num = rte_distributor_get_pkt(d, id, buf, buf, num); } worker_stats[id].handled_packets += num; - count += num; rte_distributor_return_pkt(d, id, buf, num); return 0; } diff --git a/app/test/test_thash_perf.c b/app/test/test_thash_perf.c index 7aa9360120..c95785d8bb 100644 --- a/app/test/test_thash_perf.c +++ b/app/test/test_thash_perf.c @@ -61,6 +61,8 @@ run_rss_calc(uint32_t *tuples[BATCH_SZ], enum test_rss_type type, int len, } end_tsc = rte_rdtsc_precise(); + RTE_SET_USED(hash); + return end_tsc - start_tsc; } -- 2.25.1