diff options
author | Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> | 2010-10-21 17:23:14 +0900 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2010-10-21 13:12:14 -0200 |
commit | 91036559e1e779142ce3021613f9719df94efd4d (patch) | |
tree | db80136f3065af22cb6bdc2af28919376b787f1d /target-i386 | |
parent | 8ecb8fa5a545440d8bbeb23d30244740ff3a7190 (diff) | |
download | qemu-91036559e1e779142ce3021613f9719df94efd4d.tar.gz qemu-91036559e1e779142ce3021613f9719df94efd4d.tar.bz2 qemu-91036559e1e779142ce3021613f9719df94efd4d.zip |
Fix build on !KVM_CAP_MCE
This patch removes following warnings:
target-i386/kvm.c: In function 'kvm_put_msrs':
target-i386/kvm.c:782: error: unused variable 'i'
target-i386/kvm.c: In function 'kvm_get_msrs':
target-i386/kvm.c:1083: error: label at end of compound statement
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'target-i386')
-rw-r--r-- | target-i386/kvm.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 9144f74e2d..587ee195da 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -783,7 +783,7 @@ static int kvm_put_msrs(CPUState *env, int level) struct kvm_msr_entry entries[100]; } msr_data; struct kvm_msr_entry *msrs = msr_data.entries; - int i, n = 0; + int n = 0; kvm_msr_entry_set(&msrs[n++], MSR_IA32_SYSENTER_CS, env->sysenter_cs); kvm_msr_entry_set(&msrs[n++], MSR_IA32_SYSENTER_ESP, env->sysenter_esp); @@ -805,6 +805,7 @@ static int kvm_put_msrs(CPUState *env, int level) } #ifdef KVM_CAP_MCE if (env->mcg_cap) { + int i; if (level == KVM_PUT_RESET_STATE) kvm_msr_entry_set(&msrs[n++], MSR_MCG_STATUS, env->mcg_status); else if (level == KVM_PUT_FULL_STATE) { @@ -1089,9 +1090,9 @@ static int kvm_get_msrs(CPUState *env) if (msrs[i].index >= MSR_MC0_CTL && msrs[i].index < MSR_MC0_CTL + (env->mcg_cap & 0xff) * 4) { env->mce_banks[msrs[i].index - MSR_MC0_CTL] = msrs[i].data; - break; } #endif + break; } } |