diff options
author | Wolfgang Denk <wd@denx.de> | 2011-10-06 00:48:12 +0400 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2011-10-10 01:24:49 +0400 |
commit | 419a1fe95497688cf2129472acf3158c24e96ad4 (patch) | |
tree | 5cb3036fc7d42fcaab448feb3184abb760898b71 /common | |
parent | 80c6abc306ad8baebcd02486167dbb557d90b2e3 (diff) | |
download | u-boot-419a1fe95497688cf2129472acf3158c24e96ad4.tar.xz |
CFI: fix warning: variable ... set but not used
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>
Diffstat (limited to 'common')
-rw-r--r-- | common/cmd_mtdparts.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/common/cmd_mtdparts.c b/common/cmd_mtdparts.c index 5481c885d3..2c2e4e0973 100644 --- a/common/cmd_mtdparts.c +++ b/common/cmd_mtdparts.c @@ -838,7 +838,10 @@ static int device_parse(const char *const mtd_dev, const char **ret, struct mtd_ 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; @@ -868,10 +871,12 @@ static int device_parse(const char *const mtd_dev, const char **ret, struct mtd_ 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); |