diff options
author | Simon Glass <sjg@chromium.org> | 2011-10-23 17:41:54 +0000 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2011-10-24 21:13:15 +0200 |
commit | aab773a47a8f7f40b9d7c4877853b00d22fb1347 (patch) | |
tree | 326115a66f48dfc62403b3f8212f92657f83fd2e /arch/powerpc | |
parent | 4962e38e9a4a053792722918bb11c5408549aebd (diff) | |
download | u-boot-imx-aab773a47a8f7f40b9d7c4877853b00d22fb1347.zip u-boot-imx-aab773a47a8f7f40b9d7c4877853b00d22fb1347.tar.gz u-boot-imx-aab773a47a8f7f40b9d7c4877853b00d22fb1347.tar.bz2 |
powerpc: Correct build warning introduced by getenv_ulong() patch
Commit 1272592 introduced a warning since the variable 's' is no longer
always used, depending on the CONFIG options.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/lib/board.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/powerpc/lib/board.c b/arch/powerpc/lib/board.c index 6cb0ed6..508075f 100644 --- a/arch/powerpc/lib/board.c +++ b/arch/powerpc/lib/board.c @@ -623,7 +623,6 @@ void board_init_f (ulong bootflag) */ void board_init_r (gd_t *id, ulong dest_addr) { - char *s; bd_t *bd; ulong malloc_start; @@ -727,6 +726,8 @@ void board_init_r (gd_t *id, ulong dest_addr) flash_size = 0; } else if ((flash_size = flash_init ()) > 0) { # ifdef CONFIG_SYS_FLASH_CHECKSUM + char *s; + print_size (flash_size, ""); /* * Compute and print flash CRC if flashchecksum is set to 'y' @@ -927,8 +928,11 @@ void board_init_r (gd_t *id, ulong dest_addr) /* Initialize from environment */ load_addr = getenv_ulong("loadaddr", 16, load_addr); #if defined(CONFIG_CMD_NET) - if ((s = getenv ("bootfile")) != NULL) { - copy_filename (BootFile, s, sizeof (BootFile)); + { + char *s = getenv("bootfile"); + + if (s != NULL) + copy_filename(BootFile, s, sizeof(BootFile)); } #endif |