* [Qemu-devel] [PATCH] hw/xen_disk: Remove unused local variable
@ 2011-05-08 7:01 Stefan Weil
2011-05-09 8:34 ` Kevin Wolf
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Weil @ 2011-05-08 7:01 UTC (permalink / raw)
To: QEMU Developers; +Cc: Kevin Wolf
cppcheck report:
hw/xen_disk.c:309: style:
Variable 'len' is assigned a value that is never used
Cc: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
---
hw/xen_disk.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/hw/xen_disk.c b/hw/xen_disk.c
index 558bf8a..c3b8d4c 100644
--- a/hw/xen_disk.c
+++ b/hw/xen_disk.c
@@ -306,7 +306,7 @@ static int ioreq_map(struct ioreq *ioreq)
static int ioreq_runio_qemu_sync(struct ioreq *ioreq)
{
struct XenBlkDev *blkdev = ioreq->blkdev;
- int i, rc, len = 0;
+ int i, rc;
off_t pos;
if (ioreq->req.nr_segments && ioreq_map(ioreq) == -1)
@@ -327,7 +327,6 @@ static int ioreq_runio_qemu_sync(struct ioreq *ioreq)
ioreq->v.iov[i].iov_len);
goto err;
}
- len += ioreq->v.iov[i].iov_len;
pos += ioreq->v.iov[i].iov_len;
}
break;
@@ -346,7 +345,6 @@ static int ioreq_runio_qemu_sync(struct ioreq *ioreq)
ioreq->v.iov[i].iov_len);
goto err;
}
- len += ioreq->v.iov[i].iov_len;
pos += ioreq->v.iov[i].iov_len;
}
break;
--
1.7.2.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-05-09 8:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-08 7:01 [Qemu-devel] [PATCH] hw/xen_disk: Remove unused local variable Stefan Weil
2011-05-09 8:34 ` Kevin Wolf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).