Re: [PATCH 1/2] qemu: avoid dead store in doPeer2PeerMigrate3 | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
On 08/16/2011 06:02 PM, Osier Yang wrote:
We should probably emit a log message if confirm failed, at which point, ret would be used in the conditional deciding whether to do a log message rather than value stored to 'ret' is never read,于 2011年08月16日 17:24, Alex Jia 写道:* src/qemu/qemu_migration.c: avoid dead 'ret' assignment and silence clang warning. Detected by ccc-analyzer: CC libvirt_driver_qemu_la-qemu_migration.loqemu/qemu_migration.c:2046:5: warning: Value stored to 'ret' is never readret = qemuMigrationConfirm(driver, sconn, vm, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --- src/qemu/qemu_migration.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 5510493..469bb4a 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -2050,6 +2050,9 @@ finish: * do, but fortunately worst case is that there is a * domain left in 'paused' state on source. */ + if (ret< 0) + VIR_WARN("Guest %s probably left in 'paused' state on source", + vm->def->name);Error is already reported by qemuMigrationConfirm if it fails on resuming the guest on source host. Think it's not worth to introduce a warning just to avoid the clang warning.
I have ever discussed this issue with Eric, this is his advice. Thanks, Alex
cleanup: if (ddomain) {
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list
[Virt Tools] [Libvirt Users] [Fedora Users] [Fedora Legacy] [Fedora Maintainers] [Fedora Desktop] [Fedora SELinux] [Big List of Linux Books] [Yosemite News] [Yosemite Photos] [KDE Users] [Fedora Tools]