[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH qemu] xics-kvm: Fix compile warning
From: |
David Gibson |
Subject: |
Re: [Qemu-ppc] [PATCH qemu] xics-kvm: Fix compile warning |
Date: |
Tue, 19 Jun 2018 21:17:16 +1000 |
User-agent: |
Mutt/1.10.0 (2018-05-17) |
On Tue, Jun 19, 2018 at 06:56:31PM +1000, Alexey Kardashevskiy wrote:
> This fixes uninitialized variable warning:
>
> /home/aik/p/qemu/hw/intc/xics_kvm.c: In function ‘ics_set_kvm_state’:
> /home/aik/p/qemu/hw/intc/xics_kvm.c:281:20: warning: ‘ret’ may be used
> uninitialized in this function [-Wmaybe-uninitialized]
> return ret;
> ^~~
>
> Discovered with gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0 from Ubuntu 18.04.
>
> Fixes: bf358b541b8 "xics_kvm: use KVM helpers"
> Signed-off-by: Alexey Kardashevskiy <address@hidden>
This no longer applies on ppc-for-3.0.
> ---
> hw/intc/xics_kvm.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/intc/xics_kvm.c b/hw/intc/xics_kvm.c
> index 8bdf6af..48efbce 100644
> --- a/hw/intc/xics_kvm.c
> +++ b/hw/intc/xics_kvm.c
> @@ -273,8 +273,8 @@ static int ics_set_kvm_state(ICSState *ics, int
> version_id)
> state |= KVM_XICS_QUEUED;
> }
>
> - kvm_device_access(kernel_xics_fd, KVM_DEV_XICS_GRP_SOURCES,
> - i + ics->offset, &state, true, &local_err);
> + ret = kvm_device_access(kernel_xics_fd, KVM_DEV_XICS_GRP_SOURCES,
> + i + ics->offset, &state, true, &local_err);
> if (local_err) {
> error_report("Unable to restore KVM interrupt controller state"
> " for IRQs %d: %s", i + ics->offset, strerror(errno));
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature