From ab19b5de9b8a40431fda8d355d4512dcdf51a235 Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Thu, 28 Oct 2021 21:22:17 +0000 Subject: [PATCH] ftl: fix set-but-not-used error ftl_dev_dump_bands accumulates a total in a local variable, but the final value never gets used. So just remove the variable completely. Found with clang-13. Signed-off-by: Jim Harris Change-Id: I7a92f6bfa4ae56fc4d8189c887bf0f6d4a05d759 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10055 Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins Reviewed-by: Ben Walker Reviewed-by: Changpeng Liu --- lib/ftl/ftl_debug.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/ftl/ftl_debug.c b/lib/ftl/ftl_debug.c index 4ef4fec02..3bf8e0141 100644 --- a/lib/ftl/ftl_debug.c +++ b/lib/ftl/ftl_debug.c @@ -94,7 +94,7 @@ ftl_band_validate_md(struct ftl_band *band) void ftl_dev_dump_bands(struct spdk_ftl_dev *dev) { - size_t i, total = 0; + size_t i; if (!dev->bands) { return; @@ -112,7 +112,6 @@ ftl_dev_dump_bands(struct spdk_ftl_dev *dev) continue; } - total += dev->bands[i].lba_map.num_vld; ftl_debug(" Band %3zu: %8zu / %zu \tnum_zones: %zu \twr_cnt: %"PRIu64"\tmerit:" "%10.3f\tstate: %s\n", i + 1, dev->bands[i].lba_map.num_vld,