Message ID | 1317849453-8216-1-git-send-email-wd@denx.de |
---|---|
State | Accepted |
Headers | show |
Hi Wolfgang, On Wed, Oct 5, 2011 at 2:17 PM, Wolfgang Denk <wd@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@denx.de> > Cc: Albert ARIBAUD <albert.u.boot@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@lists.denx.de > http://lists.denx.de/mailman/listinfo/u-boot >
Dear Wolfgang Denk, In message <1317849453-8216-1-git-send-email-wd@denx.de> you wrote: > Fix: > board.c:445:8: warning: variable 'bd' set but not used [-Wunused-but-set-variable] > > Signed-off-by: Wolfgang Denk <wd@denx.de> > Cc: Albert ARIBAUD <albert.u.boot@aribaud.net> > --- > arch/arm/lib/board.c | 2 -- > 1 files changed, 0 insertions(+), 2 deletions(-) Applied, thanks. Best regards, Wolfgang Denk
Dear Simon Glass, In message <CAPnjgZ2okU0d5KzjHJnQar2Zi_8y0Fsp1pSkpCy5GSdeY1iPCg@mail.gmail.com> you wrote: > > 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. You are right - thanks for pointing out. Fixed when checking in. Best regards, Wolfgang Denk
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 */
Fix: board.c:445:8: warning: variable 'bd' set but not used [-Wunused-but-set-variable] Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net> --- arch/arm/lib/board.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)