[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2] kvm: Fix enable_cap helpers on older gcc
From: |
Cornelia Huck |
Subject: |
Re: [Qemu-devel] [PATCH v2] kvm: Fix enable_cap helpers on older gcc |
Date: |
Tue, 20 May 2014 12:53:06 +0200 |
On Mon, 12 May 2014 11:51:37 +0200
Alexander Graf <address@hidden> wrote:
> Commit 40f1ee27aa1 introduced handy helpers for enable_cap calls on
> vcpu and vm level. Unfortunately some older gcc versions (4.7.1, 4.6)
> seem to choke on signedness detection in inline created variables:
>
> target-ppc/kvm.c: In function 'kvmppc_booke_watchdog_enable':
> target-ppc/kvm.c:1302:21: error: comparison of unsigned expression < 0 is
> always false [-Werror=type-limits]
> target-ppc/kvm.c: In function 'kvmppc_set_papr':
> target-ppc/kvm.c:1504:21: error: comparison of unsigned expression < 0 is
> always false [-Werror=type-limits]
>
> However - thanks to Thomas Huth for the suggestion - we can just cast the
> offending potentially 0 value to a signed type, making the comparison signed.
>
> Signed-off-by: Alexander Graf <address@hidden>
>
Mind if I take this through s390-next instead of your tree, so I can
send a pull request with clean conscience?