mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 19:36:35 +08:00
Fix error: mtd/smart.c:2800:12: error: variable 'mincount' set but not used [-Werror,-Wunused-but-set-variable]
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
@@ -2797,7 +2797,6 @@ static int smart_relocate_static_data(FAR struct smart_struct_s *dev,
|
|||||||
uint16_t minblock;
|
uint16_t minblock;
|
||||||
uint16_t nextsector;
|
uint16_t nextsector;
|
||||||
uint16_t newsector;
|
uint16_t newsector;
|
||||||
uint16_t mincount;
|
|
||||||
int ret;
|
int ret;
|
||||||
FAR struct smart_sect_header_s *header;
|
FAR struct smart_sect_header_s *header;
|
||||||
#ifdef CONFIG_MTD_SMART_ENABLE_CRC
|
#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;
|
freecount = dev->sectorsperblk + 1;
|
||||||
minblock = dev->geo.neraseblocks;
|
minblock = dev->geo.neraseblocks;
|
||||||
mincount = 0;
|
|
||||||
for (x = 0; x < dev->geo.neraseblocks; x++)
|
for (x = 0; x < dev->geo.neraseblocks; x++)
|
||||||
{
|
{
|
||||||
if (smart_get_wear_level(dev, x) == dev->minwearlevel)
|
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.
|
* dir sectors.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
mincount++;
|
|
||||||
|
|
||||||
#ifdef CONFIG_MTD_SMART_PACK_COUNTS
|
#ifdef CONFIG_MTD_SMART_PACK_COUNTS
|
||||||
if (smart_get_count(dev, dev->releasecount, x) +
|
if (smart_get_count(dev, dev->releasecount, x) +
|
||||||
smart_get_count(dev, dev->freecount, x) < freecount)
|
smart_get_count(dev, dev->freecount, x) < freecount)
|
||||||
|
|||||||
Reference in New Issue
Block a user