[U-Boot] [PATCH] cmd_flash.c: fix compile error for boards with DataFlash
Wolfgang Denk
wd at denx.de
Sun Jul 19 19:36:53 CEST 2009
Dear Alessandro Rubini,
In message <20090719163317.GA18649 at mail.gnudd.com> you wrote:
> From: Alessandro Rubini <rubini at gnudd.com>
>
> The local variables addr_first and addr_last are used if HAS_DATAFLASH
> even if SYS_NO_FLASH (meaning no NOR flash). This adds the definitions
> withing the brace where the names are used, to avoid cluttering the
> initial ifdef.
>
> Signed-off-by: Alessandro Rubini <rubini at gnudd.com>
Yes, I ran into this myself, too. Unfortunaltely I must have
overlooked these ARM error messages when I tested commit 5669ed45
("cmd_flash.c: fix warning: unused variable 'addr_first'/'addr_last'").
Instead of adding another declaration for these variables as you are
doing here, I prefer to change the #ifdef mess^H^H^H^Hlogic earlier in
the file:
More information about the U-Boot
mailing list