diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2010-07-07 19:37:53 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2010-07-07 19:37:53 +0000 |
commit | 09d7ae9000fe27d1861cb0348cbf71563ded6148 (patch) | |
tree | c77735ce912677a2b1ae73c48b52871336d5969f /exec.c | |
parent | 6defcc3784c21a846c520ef15b5dbe62f0a95075 (diff) |
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>
Diffstat (limited to 'exec.c')
-rw-r--r-- | exec.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |