diff options
| author | Jeff Cody | 2016-10-31 22:50:44 +0100 |
|---|---|---|
| committer | Peter Maydell | 2016-11-01 10:31:53 +0100 |
| commit | 02ba9265e8d65f24d0cdca158d96e0b0451f6b71 (patch) | |
| tree | a288459002841de35a3d55b0a027eb3ff2f91363 | |
| parent | Merge remote-tracking branch 'remotes/ehabkost/tags/x86-and-machine-pull-requ... (diff) | |
| download | qemu-02ba9265e8d65f24d0cdca158d96e0b0451f6b71.tar.gz qemu-02ba9265e8d65f24d0cdca158d96e0b0451f6b71.tar.xz qemu-02ba9265e8d65f24d0cdca158d96e0b0451f6b71.zip | |
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@ilande.co.uk>
Signed-off-by: Jeff Cody <jcody@redhat.com>
Reviewed-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
Message-id: 259818682e41b95ae60f1423b87954a3fe377639.1477950393.git.jcody@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| -rw-r--r-- | migration/colo.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/migration/colo.c b/migration/colo.c index e7224b8a0a..93c85c538b 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) { |
