Skip to contentSkip to conversation

Silence unused s warning

PATCH Applied Jan Kiszka 2 participants 2 messages Dec 18, 2008

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 Silence unused s warning

Move s under #ifdef to avoid compiler warning.

---

 kvm-all.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
kvm-all.c +1 -1
index 11034df..9fb295c 100644
@@ -654,9 +654,9 @@ int kvm_vcpu_ioctl(CPUState *env, int type, ...)
 
 int kvm_has_sync_mmu(void)
 {
+#ifdef KVM_CAP_SYNC_MMU
     KVMState *s = kvm_state;
 
-#ifdef KVM_CAP_SYNC_MMU
     if (kvm_ioctl(s, KVM_CHECK_EXTENSION, KVM_CAP_SYNC_MMU) > 0)
         return 1;
 #endif
#1 lore raw
Quoted 3 lines · Jan Kiszka

Move s under #ifdef to avoid compiler warning.

Thanks, applied.

Quoted 23 lines

---

 kvm-all.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
kvm-all.c +1 -1
index 11034df..9fb295c 100644
@@ -654,9 +654,9 @@ int kvm_vcpu_ioctl(CPUState *env, int type, ...)
 
 int kvm_has_sync_mmu(void)
 {
+#ifdef KVM_CAP_SYNC_MMU
     KVMState *s = kvm_state;
 
-#ifdef KVM_CAP_SYNC_MMU
     if (kvm_ioctl(s, KVM_CHECK_EXTENSION, KVM_CAP_SYNC_MMU) > 0)
         return 1;
 #endif
Signature · 4 lines
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   [email protected]         | [email protected]
   `-    people.debian.org/~aurel32 | www.aurel32.net