
6 Dec
2015
6 Dec
'15
5:45 p.m.
Hi Sjoerd,
On 4 December 2015 at 15:27, Sjoerd Simons sjoerd.simons@collabora.co.uk wrote:
gcc fails to work out that the mmc variable will only ever be used if it has been initialized by spl_mmc_get_device_index and throws the following error:
common/spl/spl_mmc.c: In function ‘spl_mmc_load_image’: 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;
Prevent this by explicitly initializing the variable.
Signed-off-by: Sjoerd Simons sjoerd.simons@collabora.co.uk
See:
http://patchwork.ozlabs.org/patch/551653/
Regards, Simon