On 02.10.19 18:01, Kevin Wolf wrote: > Am 30.09.2019 um 15:19 hat Christian Borntraeger geschrieben: >> From: Paolo Bonzini <pbonzini@xxxxxxxxxx> >> >> Currently MemoryRegionSection has 1:1 mapping to KVMSlot. >> However next patch will allow splitting MemoryRegionSection into >> several KVMSlot-s, make sure that kvm_physical_log_slot_clear() >> is able to handle such 1:N mapping. >> >> Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx> >> Signed-off-by: Igor Mammedov <imammedo@xxxxxxxxxx> >> Reviewed-by: Peter Xu <peterx@xxxxxxxxxx> >> Message-Id: <20190924144751.24149-3-imammedo@xxxxxxxxxx> >> Acked-by: Paolo Bonzini <pbonzini@xxxxxxxxxx> >> Signed-off-by: Christian Borntraeger <borntraeger@xxxxxxxxxx> > > This broke the build for me on F29: > > CC x86_64-softmmu/accel/kvm/kvm-all.o > /tmp/qemu/accel/kvm/kvm-all.c: In function 'kvm_log_clear': > /tmp/qemu/accel/kvm/kvm-all.c:1086:8: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized] > if (r < 0) { > ^ > cc1: all warnings being treated as errors > Does diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index aabe097c410f..e2605da22e7e 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c @@ -712,7 +712,7 @@ static int kvm_physical_log_clear(KVMMemoryListener *kml, KVMState *s = kvm_state; uint64_t start, size, offset, count; KVMSlot *mem; - int ret, i; + int ret = 0, i; if (!s->manual_dirty_log_protect) { /* No need to do explicit clear */ fix the message?