From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Date: Sun, 30 Oct 2011 20:47:22 -0400 Subject: [U-Boot] [PATCH] powerpc: Correct build warning introduced by getenv_ulong() patch In-Reply-To: <1319427714-29479-1-git-send-email-sjg@chromium.org> References: <1319427714-29479-1-git-send-email-sjg@chromium.org> Message-ID: <201110302047.22924.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Sunday 23 October 2011 23:41:54 Simon Glass wrote: > --- a/arch/powerpc/lib/board.c > +++ b/arch/powerpc/lib/board.c > > */ > 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 same feedback here wrt using __maybe_unused and marking things const ... -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20111030/1ec12b89/attachment.pgp