Skip to content
Snippets Groups Projects
Commit aab773a4 authored by Simon Glass's avatar Simon Glass Committed by Wolfgang Denk
Browse files

powerpc: Correct build warning introduced by getenv_ulong() patch


Commit 1272592e introduced a warning since the variable 's' is no longer
always used, depending on the CONFIG options.

Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
parent 4962e38e
No related branches found
No related tags found
No related merge requests found
...@@ -623,7 +623,6 @@ void board_init_f (ulong bootflag) ...@@ -623,7 +623,6 @@ void board_init_f (ulong bootflag)
*/ */
void board_init_r (gd_t *id, ulong dest_addr) void board_init_r (gd_t *id, ulong dest_addr)
{ {
char *s;
bd_t *bd; bd_t *bd;
ulong malloc_start; ulong malloc_start;
...@@ -727,6 +726,8 @@ void board_init_r (gd_t *id, ulong dest_addr) ...@@ -727,6 +726,8 @@ void board_init_r (gd_t *id, ulong dest_addr)
flash_size = 0; flash_size = 0;
} else if ((flash_size = flash_init ()) > 0) { } else if ((flash_size = flash_init ()) > 0) {
# ifdef CONFIG_SYS_FLASH_CHECKSUM # ifdef CONFIG_SYS_FLASH_CHECKSUM
char *s;
print_size (flash_size, ""); print_size (flash_size, "");
/* /*
* Compute and print flash CRC if flashchecksum is set to 'y' * 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) ...@@ -927,8 +928,11 @@ void board_init_r (gd_t *id, ulong dest_addr)
/* Initialize from environment */ /* Initialize from environment */
load_addr = getenv_ulong("loadaddr", 16, load_addr); load_addr = getenv_ulong("loadaddr", 16, load_addr);
#if defined(CONFIG_CMD_NET) #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 #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment