diff options
author | Stefan Roese | 2011-11-15 02:02:54 -0600 |
---|---|---|
committer | Wolfgang Denk | 2011-11-16 14:16:49 -0600 |
commit | 6d68621ceaca2513fefd7759dd3f7719e951e56a (patch) | |
tree | ee8b73eae16649e3aa632fd9f2c5e2f514237471 /nand_spl | |
parent | 13a8c8d0e97ecff486aab589b4f69acb795f0b2b (diff) | |
download | u-boot-6d68621ceaca2513fefd7759dd3f7719e951e56a.tar.gz u-boot-6d68621ceaca2513fefd7759dd3f7719e951e56a.tar.xz u-boot-6d68621ceaca2513fefd7759dd3f7719e951e56a.zip |
nand_boot.c: Fix GCC 4.6 build warnings
Fix:
nand_boot.c: In function 'nand_read_page':
nand_boot.c:190:6: warning: variable 'stat' set but not used [-Wunused-but-set-variable]
nand_boot.c: In function 'nand_boot':
nand_boot.c:271:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'nand_spl')
-rw-r--r-- | nand_spl/nand_boot.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/nand_spl/nand_boot.c b/nand_spl/nand_boot.c index 615ef258a8..bee102950a 100644 --- a/nand_spl/nand_boot.c +++ b/nand_spl/nand_boot.c | |||
@@ -187,7 +187,6 @@ static int nand_read_page(struct mtd_info *mtd, int block, int page, uchar *dst) | |||
187 | int eccbytes = CONFIG_SYS_NAND_ECCBYTES; | 187 | int eccbytes = CONFIG_SYS_NAND_ECCBYTES; |
188 | int eccsteps = CONFIG_SYS_NAND_ECCSTEPS; | 188 | int eccsteps = CONFIG_SYS_NAND_ECCSTEPS; |
189 | uint8_t *p = dst; | 189 | uint8_t *p = dst; |
190 | int stat; | ||
191 | 190 | ||
192 | nand_command(mtd, block, page, 0, NAND_CMD_READ0); | 191 | nand_command(mtd, block, page, 0, NAND_CMD_READ0); |
193 | 192 | ||
@@ -217,7 +216,7 @@ static int nand_read_page(struct mtd_info *mtd, int block, int page, uchar *dst) | |||
217 | * from correct_data(). We just hope that all possible errors | 216 | * from correct_data(). We just hope that all possible errors |
218 | * are corrected by this routine. | 217 | * are corrected by this routine. |
219 | */ | 218 | */ |
220 | stat = this->ecc.correct(mtd, p, &ecc_code[i], &ecc_calc[i]); | 219 | this->ecc.correct(mtd, p, &ecc_code[i], &ecc_calc[i]); |
221 | } | 220 | } |
222 | 221 | ||
223 | return 0; | 222 | return 0; |
@@ -268,7 +267,6 @@ void nand_boot(void) | |||
268 | { | 267 | { |
269 | struct nand_chip nand_chip; | 268 | struct nand_chip nand_chip; |
270 | nand_info_t nand_info; | 269 | nand_info_t nand_info; |
271 | int ret; | ||
272 | __attribute__((noreturn)) void (*uboot)(void); | 270 | __attribute__((noreturn)) void (*uboot)(void); |
273 | 271 | ||
274 | /* | 272 | /* |
@@ -287,8 +285,8 @@ void nand_boot(void) | |||
287 | /* | 285 | /* |
288 | * Load U-Boot image from NAND into RAM | 286 | * Load U-Boot image from NAND into RAM |
289 | */ | 287 | */ |
290 | ret = nand_load(&nand_info, CONFIG_SYS_NAND_U_BOOT_OFFS, CONFIG_SYS_NAND_U_BOOT_SIZE, | 288 | nand_load(&nand_info, CONFIG_SYS_NAND_U_BOOT_OFFS, CONFIG_SYS_NAND_U_BOOT_SIZE, |
291 | (uchar *)CONFIG_SYS_NAND_U_BOOT_DST); | 289 | (uchar *)CONFIG_SYS_NAND_U_BOOT_DST); |
292 | 290 | ||
293 | #ifdef CONFIG_NAND_ENV_DST | 291 | #ifdef CONFIG_NAND_ENV_DST |
294 | nand_load(&nand_info, CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE, | 292 | nand_load(&nand_info, CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE, |