[U-Boot] [PATCH] pci_rom.c: Fix may be used uninitialized warning

Simon Glass sjg at chromium.org
Tue Jan 19 04:01:08 CET 2016


On 16 January 2016 at 07:58, Bin Meng <bmeng.cn at gmail.com> wrote:
> On Sat, Jan 16, 2016 at 10:50 PM, Tom Rini <trini at konsulko.com> wrote:
>> With gcc-5.x we get:
>> drivers/pci/pci_rom.c: In function 'dm_pci_run_vga_bios':
>> drivers/pci/pci_rom.c:352:3: warning: 'ram' may be used uninitialized in
>> this function [-Wmaybe-uninitialized]
>>
>> While unconvinced that this can happen in practice (if we malloc we set
>> alloced to true, it will be false otherwise), silence the compiler.
>>
>> Signed-off-by: Tom Rini <trini at konsulko.com>
>> ---
>>  drivers/pci/pci_rom.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>
> Reviewed-by: Bin Meng <bmeng.cn at gmail.com>

Thanks Tom. I did something wrong there...

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list