Patchwork ppc: kvm: fix signedness warning

login
register
mail settings
Submitter Alexander Graf
Date Nov. 25, 2010, 7:20 a.m.
Message ID <1290669646-12150-1-git-send-email-agraf@suse.de>
Download mbox | patch
Permalink /patch/73027/
State New
Headers show

Comments

Alexander Graf - Nov. 25, 2010, 7:20 a.m.
I get a warning on a signed comparison with an unsigned variable, so
let's make the variable signed and be happy.

Signed-off-by: Alexander Graf <agraf@suse.de>
---
 target-ppc/kvm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Alexander Graf - Dec. 8, 2010, 11:01 a.m.
ping?

On 25.11.2010, at 08:20, Alexander Graf wrote:

> I get a warning on a signed comparison with an unsigned variable, so
> let's make the variable signed and be happy.
> 
> Signed-off-by: Alexander Graf <agraf@suse.de>
> ---
> target-ppc/kvm.c |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c
> index 5cacef7..5caa07c 100644
> --- a/target-ppc/kvm.c
> +++ b/target-ppc/kvm.c
> @@ -132,7 +132,7 @@ int kvm_arch_get_registers(CPUState *env)
> {
>     struct kvm_regs regs;
>     struct kvm_sregs sregs;
> -    uint32_t i, ret;
> +    int i, ret;
> 
>     ret = kvm_vcpu_ioctl(env, KVM_GET_REGS, &regs);
>     if (ret < 0)
> -- 
> 1.6.0.2
> 
>
Edgar Iglesias - Dec. 8, 2010, 8:58 p.m.
On Wed, Dec 08, 2010 at 12:01:43PM +0100, Alexander Graf wrote:
> ping?

I've applied this, thanks.


> On 25.11.2010, at 08:20, Alexander Graf wrote:
> 
> > I get a warning on a signed comparison with an unsigned variable, so
> > let's make the variable signed and be happy.
> > 
> > Signed-off-by: Alexander Graf <agraf@suse.de>
> > ---
> > target-ppc/kvm.c |    2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c
> > index 5cacef7..5caa07c 100644
> > --- a/target-ppc/kvm.c
> > +++ b/target-ppc/kvm.c
> > @@ -132,7 +132,7 @@ int kvm_arch_get_registers(CPUState *env)
> > {
> >     struct kvm_regs regs;
> >     struct kvm_sregs sregs;
> > -    uint32_t i, ret;
> > +    int i, ret;
> > 
> >     ret = kvm_vcpu_ioctl(env, KVM_GET_REGS, &regs);
> >     if (ret < 0)
> > -- 
> > 1.6.0.2
> > 
> > 
> 
>

Patch

diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c
index 5cacef7..5caa07c 100644
--- a/target-ppc/kvm.c
+++ b/target-ppc/kvm.c
@@ -132,7 +132,7 @@  int kvm_arch_get_registers(CPUState *env)
 {
     struct kvm_regs regs;
     struct kvm_sregs sregs;
-    uint32_t i, ret;
+    int i, ret;
 
     ret = kvm_vcpu_ioctl(env, KVM_GET_REGS, &regs);
     if (ret < 0)