[U-Boot] [PATCH 1/7] arch/arm/lib/board.c: fix warning: variable ... set but not used

Simon Glass sjg at chromium.org
Fri Oct 7 19:13:21 CEST 2011


Hi Wolfgang,

On Wed, Oct 5, 2011 at 2:17 PM, Wolfgang Denk <wd at denx.de> wrote:
> Fix:
> board.c:445:8: warning: variable 'bd' set but not used [-Wunused-but-set-variable]
>
> Signed-off-by: Wolfgang Denk <wd at denx.de>
> Cc: Albert ARIBAUD <albert.u.boot at aribaud.net>
> ---
>  arch/arm/lib/board.c |    2 --
>  1 files changed, 0 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
> index 705d4d2..b266f78 100644
> --- a/arch/arm/lib/board.c
> +++ b/arch/arm/lib/board.c
> @@ -442,14 +442,12 @@ static char *failed = "*** failed ***\n";
>  void board_init_r(gd_t *id, ulong dest_addr)
>  {
>        char *s;
> -       bd_t *bd;
>        ulong malloc_start;
>  #if !defined(CONFIG_SYS_NO_FLASH)
>        ulong flash_size;
>  #endif
>
>        gd = id;
> -       bd = gd->bd;
>
>        gd->flags |= GD_FLG_RELOC;      /* tell others: relocation done */

Sorry if I have missed a mailing list patch, but in my version of the
source there is a line a little lower down which uses bd:

       mmc_initialize(bd);

Of course it can just become gd->bd so there is no problem removing
the variable.

Regards,
Simon

>
> --
> 1.7.6.2
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>


More information about the U-Boot mailing list