Fix:
cfi_mtd.c: In function 'cfi_mtd_init':
cfi_mtd.c:226:19: warning: variable 'mtd_list' set but not used [-Wunused-but-set-variable]
cfi_mtd.c: In function 'cfi_mtd_init':
cfi_mtd.c:225:6: warning: unused variable 'devices_found'
cfi_mtd.c: In function 'cfi_mtd_init':
cfi_mtd.c:226:19: warning: variable 'mtd_list' set but not used [-Wunused-but-set-variable]
[-Wunused-variable]
Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Stefan Roese <sr@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
struct mtdids *id;
const char *mtd_id;
unsigned int mtd_id_len;
- const char *p, *pend;
+ const char *p;
+#ifdef DEBUG
+ const char *pend;
+#endif
LIST_HEAD(tmp_list);
struct list_head *entry, *n;
u16 num_parts;
return 1;
}
+#ifdef DEBUG
+ pend = strchr(p, ';');
+#endif
debug("dev type = %d (%s), dev num = %d, mtd-id = %s\n",
id->type, MTD_DEV_TYPE(id->type),
id->num, id->mtd_id);
- pend = strchr(p, ';');
debug("parsing partitions %.*s\n", (pend ? pend - p : strlen(p)), p);
struct mtd_info *mtd;
flash_info_t *fi;
int error, i;
+#ifdef CONFIG_MTD_CONCAT
int devices_found = 0;
struct mtd_info *mtd_list[CONFIG_SYS_MAX_FLASH_BANKS];
+#endif
for (i = 0; i < CONFIG_SYS_MAX_FLASH_BANKS; i++) {
fi = &flash_info[i];
if (add_mtd_device(mtd))
return -ENOMEM;
+#ifdef CONFIG_MTD_CONCAT
mtd_list[devices_found++] = mtd;
+#endif
}
#ifdef CONFIG_MTD_CONCAT