[<prev] [next>] [day] [month] [year] [list]
Message-Id: <4819fed0abbd533062c09687845a6fe3d759fb22.1461749551.git.jbenc@redhat.com>
Date: Wed, 27 Apr 2016 11:33:15 +0200
From: Jiri Benc <jbenc@...hat.com>
To: virtualization@...ts.linux-foundation.org
Cc: "Michael S. Tsirkin" <mst@...hat.com>, linux-kernel@...r.kernel.org
Subject: [PATCH] virtio: silence compiler warning
gcc 4.8.5 emits the following false positive:
drivers/virtio/virtio_ring.c: In function 'vring_create_virtqueue':
drivers/virtio/virtio_ring.c:1032:5: warning: 'queue' may be used uninitialized in this function [-Wmaybe-uninitialized]
Silence it.
Signed-off-by: Jiri Benc <jbenc@...hat.com>
---
drivers/virtio/virtio_ring.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index 5c802d47892c..ca6bfddaacad 100644
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@ -1006,7 +1006,7 @@ struct virtqueue *vring_create_virtqueue(
const char *name)
{
struct virtqueue *vq;
- void *queue;
+ void *queue = NULL;
dma_addr_t dma_addr;
size_t queue_size_in_bytes;
struct vring vring;
--
1.8.3.1
Powered by blists - more mailing lists