summary refs log tree commit diff stats
path: root/migration/ram.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2024-03-28 14:20:48 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2024-10-02 16:14:29 +0400
commit85f99eb2cb9100dcabb43e9380811040e88642d8 (patch)
treedcbfdab8432d912a98dcc9b756431224ac36784a /migration/ram.c
parent26a690c36e379c5c3985ba1166310c576095d7ad (diff)
downloadfocaccia-qemu-85f99eb2cb9100dcabb43e9380811040e88642d8.tar.gz
focaccia-qemu-85f99eb2cb9100dcabb43e9380811040e88642d8.zip
migration: fix -Werror=maybe-uninitialized false-positive
../migration/ram.c:1873:23: error: ‘dirty’ may be used uninitialized [-Werror=maybe-uninitialized]

When 'block' != NULL, 'dirty' is initialized.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Peter Xu <peterx@redhat.com>
Diffstat (limited to 'migration/ram.c')
-rw-r--r--migration/ram.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/migration/ram.c b/migration/ram.c
index 81eda2736a..326ce7eb79 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -1793,7 +1793,7 @@ static bool get_queued_page(RAMState *rs, PageSearchStatus *pss)
 {
     RAMBlock  *block;
     ram_addr_t offset;
-    bool dirty;
+    bool dirty = false;
 
     do {
         block = unqueue_page(rs, &offset);