From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37642) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tuq3Y-0005bi-Nu for qemu-devel@nongnu.org; Mon, 14 Jan 2013 14:50:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tuq3U-0005xJ-07 for qemu-devel@nongnu.org; Mon, 14 Jan 2013 14:50:52 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55015) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tuq3T-0005wv-Mp for qemu-devel@nongnu.org; Mon, 14 Jan 2013 14:50:47 -0500 Date: Mon, 14 Jan 2013 21:54:19 +0200 From: "Michael S. Tsirkin" Message-ID: <20130114195419.GA27572@redhat.com> References: <1358191213-404-1-git-send-email-mdroth@linux.vnet.ibm.com> <1358191213-404-2-git-send-email-mdroth@linux.vnet.ibm.com> <87622zftds.fsf@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <87622zftds.fsf@codemonkey.ws> 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: Anthony Liguori Cc: Michael Roth , stefanha@redhat.com, qemu-devel@nongnu.org On Mon, Jan 14, 2013 at 01:37:35PM -0600, Anthony Liguori wrote: > Michael Roth writes: >=20 > > 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 >=20 > Looks like I didn't have libaio-devel installed on my new development > box :-/ >=20 > Regards, >=20 > Anthony Liguori Me neither. And apparently neither does the buildbot. > > --- > > 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(VirtIO= PCIProxy *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 > > if (irqfd->msg.data !=3D msg.data || irqfd->msg.address !=3D msg= .address) { > > ret =3D kvm_irqchip_update_msi_route(kvm_state, irqfd->virq,= msg); > > --=20 > > 1.7.9.5 >=20