From 08b151a681b5f8a538045486b6dd77f2af867715 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Mon, 11 Sep 2023 07:48:14 +0800 Subject: [PATCH] Fix error: mtd/smart.c:2800:12: error: variable 'mincount' set but not used [-Werror,-Wunused-but-set-variable] Signed-off-by: Xiang Xiao --- drivers/mtd/smart.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/mtd/smart.c b/drivers/mtd/smart.c index 7c1fb0cd8f..5b3493acb6 100644 --- a/drivers/mtd/smart.c +++ b/drivers/mtd/smart.c @@ -2797,7 +2797,6 @@ static int smart_relocate_static_data(FAR struct smart_struct_s *dev, uint16_t minblock; uint16_t nextsector; uint16_t newsector; - uint16_t mincount; int ret; FAR struct smart_sect_header_s *header; #ifdef CONFIG_MTD_SMART_ENABLE_CRC @@ -2833,7 +2832,6 @@ static int smart_relocate_static_data(FAR struct smart_struct_s *dev, freecount = dev->sectorsperblk + 1; minblock = dev->geo.neraseblocks; - mincount = 0; for (x = 0; x < dev->geo.neraseblocks; x++) { if (smart_get_wear_level(dev, x) == dev->minwearlevel) @@ -2843,8 +2841,6 @@ static int smart_relocate_static_data(FAR struct smart_struct_s *dev, * dir sectors. */ - mincount++; - #ifdef CONFIG_MTD_SMART_PACK_COUNTS if (smart_get_count(dev, dev->releasecount, x) + smart_get_count(dev, dev->freecount, x) < freecount)