Skip to contentSkip to conversation

nand_spl/nand_boot.c: Fix build warning

PATCH New Anatolij Gustschin 2 participants 2 messages Dec 7, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nand_spl/nand_boot.c: Fix build warning

Fix:
nand_boot.c: In function 'nand_read_page':
nand_boot.c:150:6: warning: variable 'stat' set but not used [-Wunused-but-set-variable]

---
 nand_spl/nand_boot.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
nand_spl/nand_boot.c +1 -2
index bee1029..2326962 100644
@@ -147,7 +147,6 @@ static int nand_read_page(struct mtd_info *mtd, int block, int page, uchar *dst)
 	int eccbytes = CONFIG_SYS_NAND_ECCBYTES;
 	int eccsteps = CONFIG_SYS_NAND_ECCSTEPS;
 	uint8_t *p = dst;
-	int stat;
 
 	/*
 	 * No malloc available for now, just use some temporary locations
@@ -170,7 +169,7 @@ static int nand_read_page(struct mtd_info *mtd, int block, int page, uchar *dst)
 		this->ecc.hwctl(mtd, NAND_ECC_READ);
 		this->read_buf(mtd, p, eccsize);
 		this->ecc.calculate(mtd, p, &ecc_calc[i]);
-		stat = this->ecc.correct(mtd, p, &ecc_code[i], &ecc_calc[i]);
+		this->ecc.correct(mtd, p, &ecc_code[i], &ecc_calc[i]);
 	}
 
 	return 0;
Signature · 1 line
1.7.5.4
#1 lore raw

PATCH 1/1 nand_spl/nand_boot.c: Fix build warning

Quoted 9 lines · Anatolij Gustschin

Fix:
nand_boot.c: In function 'nand_read_page':
nand_boot.c:150:6: warning: variable 'stat' set but not used [-Wunused-but-set-variable]

---
 nand_spl/nand_boot.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

Applied to u-boot-nand-flash

-Scott