[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [qemu-xen master] migration: fix compiler warning on uninitialized variable



commit 02ba9265e8d65f24d0cdca158d96e0b0451f6b71
Author:     Jeff Cody <jcody@xxxxxxxxxx>
AuthorDate: Mon Oct 31 17:50:44 2016 -0400
Commit:     Peter Maydell <peter.maydell@xxxxxxxxxx>
CommitDate: Tue Nov 1 09:31:53 2016 +0000

    migration: fix compiler warning on uninitialized variable
    
    Some older GCC versions (e.g. 4.4.7) report a warning on an
    uninitialized variable for 'request', even though all possible code
    paths that reference 'request' will be initialized.   To appease
    these versions, initialize the variable to 0.
    
    Reported-by: Mark Cave-Ayland <mark.cave-ayland@xxxxxxxxxxxx>
    Signed-off-by: Jeff Cody <jcody@xxxxxxxxxx>
    Reviewed-by: zhanghailiang <zhang.zhanghailiang@xxxxxxxxxx>
    Message-id: 
259818682e41b95ae60f1423b87954a3fe377639.1477950393.git.jcody@xxxxxxxxxx
    Signed-off-by: Peter Maydell <peter.maydell@xxxxxxxxxx>
---
 migration/colo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/migration/colo.c b/migration/colo.c
index e7224b8..93c85c5 100644
--- a/migration/colo.c
+++ b/migration/colo.c
@@ -439,7 +439,7 @@ void *colo_process_incoming_thread(void *opaque)
     }
 
     while (mis->state == MIGRATION_STATUS_COLO) {
-        int request;
+        int request = 0;
 
         colo_wait_handle_message(mis->from_src_file, &request, &local_err);
         if (local_err) {
--
generated by git-patchbot for /home/xen/git/qemu-xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.