Patchwork [PULL,15/17] kvm: Fix compiler warning (clang)

login
register
mail settings
Submitter Michael Tokarev
Date Sept. 20, 2013, 4:58 p.m.
Message ID <1379696296-32105-16-git-send-email-mjt@msgid.tls.msk.ru>
Download mbox | patch
Permalink /patch/276564/
State New
Headers show

Comments

Michael Tokarev - Sept. 20, 2013, 4:58 p.m.
From: Stefan Weil <sw@weilnetz.de>

Report from clang analyzer:

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

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 hw/i386/kvm/clock.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/hw/i386/kvm/clock.c b/hw/i386/kvm/clock.c
index 92aabb8..383938d 100644
--- a/hw/i386/kvm/clock.c
+++ b/hw/i386/kvm/clock.c
@@ -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;