[U-Boot] [U-Boot, v3, 1/3] spl: mmc: Fix compiler warning with CONFIG_DM_MMC
Tom Rini
trini at konsulko.com
Sun Dec 6 23:07:43 CET 2015
On Wed, Dec 02, 2015 at 10:59:11AM -0700, Simon Glass wrote:
> Since commit 4188ba3 we get the following warning on rockchip boards:
>
> common/spl/spl_mmc.c:31:24: warning: ‘mmc’ may be used uninitialized in this function [-Wmaybe-uninitialized]
> count = mmc->block_dev.block_read(0, sector, 1, header);
> ^
> common/spl/spl_mmc.c:251:14: note: ‘mmc’ was declared here
> struct mmc *mmc;
>
> Correct this by move the variable init earlier.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> Tested-by: Michal Simek <michal.simek at xilinx.com>
> Acked-by: Nikita Kiryanov <nikita at compulab.co.il>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151206/5f3c6b40/attachment.sig>
More information about the U-Boot
mailing list