From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:34235) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tupr1-0006HZ-10 for qemu-devel@nongnu.org; Mon, 14 Jan 2013 14:38:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tupqv-0002It-Lg for qemu-devel@nongnu.org; Mon, 14 Jan 2013 14:37:54 -0500 Received: from e9.ny.us.ibm.com ([32.97.182.139]:46943) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tupqv-0002IZ-HE for qemu-devel@nongnu.org; Mon, 14 Jan 2013 14:37:49 -0500 Received: from /spool/local by e9.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 14 Jan 2013 14:37:48 -0500 Received: from d01relay07.pok.ibm.com (d01relay07.pok.ibm.com [9.56.227.147]) by d01dlp03.pok.ibm.com (Postfix) with ESMTP id 80D9AC90026 for ; Mon, 14 Jan 2013 14:37:43 -0500 (EST) Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by d01relay07.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r0EJbgnj64553084 for ; Mon, 14 Jan 2013 14:37:43 -0500 Received: from d01av03.pok.ibm.com (loopback [127.0.0.1]) by d01av03.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r0EJbdPJ023045 for ; Mon, 14 Jan 2013 17:37:39 -0200 From: Anthony Liguori In-Reply-To: <1358191213-404-2-git-send-email-mdroth@linux.vnet.ibm.com> References: <1358191213-404-1-git-send-email-mdroth@linux.vnet.ibm.com> <1358191213-404-2-git-send-email-mdroth@linux.vnet.ibm.com> Date: Mon, 14 Jan 2013 13:37:35 -0600 Message-ID: <87622zftds.fsf@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 1/2] virtio-pci: build for uninitialized return value in vq_vector_unmask List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Roth , qemu-devel@nongnu.org Cc: stefanha@redhat.com, mst@redhat.com Michael Roth writes: > Fixes the following: > > /home/mdroth/w/qemu2.git/hw/virtio-pci.c: In function > =E2=80=98kvm_virtio_pci_vector_unmask=E2=80=99: > /home/mdroth/w/qemu2.git/hw/virtio-pci.c:673:12: error: =E2=80=98ret=E2= =80=99 may be > used uninitialized in this function [-Werror=3Duninitialized] > cc1: all warnings being treated as errors > make: *** [hw/virtio-pci.o] Error 1 > make: *** Waiting for unfinished jobs.... > > Signed-off-by: Michael Roth Looks like I didn't have libaio-devel installed on my new development box :-/ Regards, Anthony Liguori > --- > hw/virtio-pci.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c > index 0b49739..0934246 100644 > --- a/hw/virtio-pci.c > +++ b/hw/virtio-pci.c > @@ -616,7 +616,7 @@ static int kvm_virtio_pci_vq_vector_unmask(VirtIOPCIP= roxy *proxy, > VirtQueue *vq =3D virtio_get_queue(proxy->vdev, queue_no); > EventNotifier *n =3D virtio_queue_get_guest_notifier(vq); > VirtIOIRQFD *irqfd =3D &proxy->vector_irqfd[vector]; > - int ret; > + int ret =3D 0; >=20=20 > if (irqfd->msg.data !=3D msg.data || irqfd->msg.address !=3D msg.add= ress) { > ret =3D kvm_irqchip_update_msi_route(kvm_state, irqfd->virq, msg= ); > --=20 > 1.7.9.5