From patchwork Mon Jan 14 19:20:12 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Roth X-Patchwork-Id: 211866 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C2BFE2C0092 for ; Tue, 15 Jan 2013 06:25:26 +1100 (EST) Received: from localhost ([::1]:56417 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tupeu-000345-L1 for incoming@patchwork.ozlabs.org; Mon, 14 Jan 2013 14:25:24 -0500 Received: from eggs.gnu.org ([208.118.235.92]:59546) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tupef-0002v5-3y for qemu-devel@nongnu.org; Mon, 14 Jan 2013 14:25:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tuped-0007mS-Bp for qemu-devel@nongnu.org; Mon, 14 Jan 2013 14:25:09 -0500 Received: from mail-ie0-f181.google.com ([209.85.223.181]:41835) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tuped-0007mE-8F for qemu-devel@nongnu.org; Mon, 14 Jan 2013 14:25:07 -0500 Received: by mail-ie0-f181.google.com with SMTP id 16so5673997iea.12 for ; Mon, 14 Jan 2013 11:25:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:mime-version:content-type :content-transfer-encoding; bh=u78R2yukfS4JqcbWf+8vkMGsBkpBw45SYka89MIZi8M=; b=QFmVGq4A3Xepj/0Notv/OsB/7kU6LWw7DQOSK20EbTGkzT2WgZM1MiOzjcR1OGriye /IIlmJtApBGE+oIjhJVZajAyhhGfwBNuUVqTdRQwzRfV3LT+YvjhO1Aep+f+rEJxcRss EjB3pQKaV3bL07HVUkDmqVfehwMh8j6GTLw34hzjTlduAIk3qTdvfP0Ai+6xeDhIrZZD zfhuulXmLAIRKxnn29/LB/K36FMLy1ySALGb/BkSkuHPvqI9jw+UnM1/zBnkHhxFjatz ITp/t4Zr+R5xI/b/DQPQvGqf9CaS3xUlJa/ci6xLpo32yC8+Qmex81GjUV9hXodA+GC8 9Dng== X-Received: by 10.50.13.173 with SMTP id i13mr7646556igc.93.1358191506740; Mon, 14 Jan 2013 11:25:06 -0800 (PST) Received: from localhost ([32.97.110.59]) by mx.google.com with ESMTPS id ee8sm32753igc.13.2013.01.14.11.25.05 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 14 Jan 2013 11:25:06 -0800 (PST) From: Michael Roth To: qemu-devel@nongnu.org Date: Mon, 14 Jan 2013 13:20:12 -0600 Message-Id: <1358191213-404-2-git-send-email-mdroth@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1358191213-404-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1358191213-404-1-git-send-email-mdroth@linux.vnet.ibm.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.223.181 Cc: aliguori@us.ibm.com, stefanha@redhat.com, mst@redhat.com Subject: [Qemu-devel] [PATCH 1/2] virtio-pci: build for uninitialized return value in vq_vector_unmask X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Fixes the following: /home/mdroth/w/qemu2.git/hw/virtio-pci.c: In function ‘kvm_virtio_pci_vector_unmask’: /home/mdroth/w/qemu2.git/hw/virtio-pci.c:673:12: error: ‘ret’ may be used uninitialized in this function [-Werror=uninitialized] cc1: all warnings being treated as errors make: *** [hw/virtio-pci.o] Error 1 make: *** Waiting for unfinished jobs.... Signed-off-by: Michael Roth Reviewed-by: Eduardo Habkost --- 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(VirtIOPCIProxy *proxy, VirtQueue *vq = virtio_get_queue(proxy->vdev, queue_no); EventNotifier *n = virtio_queue_get_guest_notifier(vq); VirtIOIRQFD *irqfd = &proxy->vector_irqfd[vector]; - int ret; + int ret = 0; if (irqfd->msg.data != msg.data || irqfd->msg.address != msg.address) { ret = kvm_irqchip_update_msi_route(kvm_state, irqfd->virq, msg);