Jan Kiszka wrote:
This hunk now generates:
qemu/hw/pc.c: In function â¬Üpc_init1â¬":
qemu/hw/pc.c:762: warning: â¬Üvga_bios_offsetâ¬" may be used uninitialized in this function
For obvious reasons. Can we simply make the related
cpu_register_physical_memory conditional as well?
Jan
You are right that patch caused variable initialization issues, this
patch should fix them.
Signed-off-by: Stefano Stabellini <address@hidden>
diff --git a/hw/pc.c b/hw/pc.c
index d64e442..ff0f16d 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -759,7 +759,7 @@ static void pc_init1(ram_addr_t ram_size, int vga_ram_size,
{
char buf[1024];
int ret, linux_boot, i;
- ram_addr_t ram_addr, vga_ram_addr, bios_offset, vga_bios_offset;
+ ram_addr_t ram_addr, vga_ram_addr = 0x00, bios_offset, vga_bios_offset;
ram_addr_t below_4g_mem_size, above_4g_mem_size = 0;
int bios_size, isa_bios_size, vga_bios_size;
PCIBus *pci_bus;
@@ -831,10 +831,6 @@ static void pc_init1(ram_addr_t ram_size, int vga_ram_size,
ram_addr);
}
-
- /* allocate VGA RAM */
- vga_ram_addr = qemu_ram_alloc(vga_ram_size);
-