aboutsummaryrefslogtreecommitdiff
path: root/exec.c
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2010-07-07 19:37:53 +0000
committerBlue Swirl <blauwirbel@gmail.com>2010-07-07 19:37:53 +0000
commit09d7ae9000fe27d1861cb0348cbf71563ded6148 (patch)
treec77735ce912677a2b1ae73c48b52871336d5969f /exec.c
parent6defcc3784c21a846c520ef15b5dbe62f0a95075 (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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/exec.c b/exec.c
index 5420f564b5..4641b3eb6e 100644
--- a/exec.c
+++ b/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;