Skip to contentSkip to conversation

kvm: Fix compiler warning (clang)

PATCH Applied Stefan Weil 2 participants 2 messages Sep 17, 2013 – Sep 20, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kvm: Fix compiler warning (clang)

Report from clang analyzer:

clock.c:42:15: warning:
Value stored to 'cpu' during its initialization is never read

---
 hw/i386/kvm/clock.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/i386/kvm/clock.c +1 -1
index 92aabb8..383938d 100644
@@ -39,7 +39,7 @@ static void kvmclock_vm_state_change(void *opaque, int running,
                                      RunState state)
 {
     KVMClockState *s = opaque;
-    CPUState *cpu = first_cpu;
+    CPUState *cpu;
     int cap_clock_ctrl = kvm_check_extension(kvm_state, KVM_CAP_KVMCLOCK_CTRL);
     int ret;
 
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 4 lines · Stefan Weil

Report from clang analyzer:

clock.c:42:15: warning:
Value stored to 'cpu' during its initialization is never read

Thanks, applied to the trivial patches queue.

/mjt