mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
Fix warning about uninitialized variable
With gcc 4.2.1-sjlj (mingw32-2) I get this warning: /src/qemu/exec.c: In function 'qemu_ram_alloc': /src/qemu/exec.c:2777: warning: 'offset' may be used uninitialized in this function Fix by initializing the variable. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
6defcc3784
commit
09d7ae9000
1 changed files with 1 additions and 1 deletions
2
exec.c
2
exec.c
|
@ -2774,7 +2774,7 @@ static void *file_ram_alloc(RAMBlock *block,
|
|||
static ram_addr_t find_ram_offset(ram_addr_t size)
|
||||
{
|
||||
RAMBlock *block, *next_block;
|
||||
ram_addr_t offset, mingap = ULONG_MAX;
|
||||
ram_addr_t offset = 0, mingap = ULONG_MAX;
|
||||
|
||||
if (QLIST_EMPTY(&ram_list.blocks))
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue