drivers:mtd:smart.c: entryname is declared and should be under ifdef

This commit is contained in:
Alexander Vasiljev 2021-02-03 12:46:40 +03:00 committed by Xiang Xiao
parent 9146878dad
commit dbec1cf694
1 changed files with 3 additions and 1 deletions

View File

@ -5945,9 +5945,9 @@ static int smart_fsck_directory(FAR struct smart_struct_s *dev,
(const char *) (cur + sizeof(struct smart_entry_header_s)), (const char *) (cur + sizeof(struct smart_entry_header_s)),
dev->namesize); dev->namesize);
entryname[dev->namesize] = '\0'; entryname[dev->namesize] = '\0';
#endif
finfo("Check entry (name=%s flags=%02x logsector=%02x)\n", finfo("Check entry (name=%s flags=%02x logsector=%02x)\n",
entryname, entry->flags, entry->firstsector); entryname, entry->flags, entry->firstsector);
#endif
if (entry->flags & SMARTFS_DIRENT_ACTIVE) if (entry->flags & SMARTFS_DIRENT_ACTIVE)
{ {
@ -5969,8 +5969,10 @@ static int smart_fsck_directory(FAR struct smart_struct_s *dev,
if (ret != OK) if (ret != OK)
{ {
#ifdef CONFIG_DEBUG_FS_INFO
finfo("Remove entry (name=%s flags=%02x)\n", finfo("Remove entry (name=%s flags=%02x)\n",
entryname, entry->flags); entryname, entry->flags);
#endif
if ((cur + (2 * entrysize)) <= bottom) if ((cur + (2 * entrysize)) <= bottom)
{ {