hw/xen_disk: Remove unused local variable
PATCH 1/1 hw/xen_disk: Remove unused local variable
cppcheck report:hw/xen_disk.c:309: style:
Variable 'len' is assigned a value that is never used
Cc Kevin Wolf <[email protected]>
Signed-off-by Stefan Weil <[email protected]>
--- hw/xen_disk.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-)
hw/xen_disk.c +1 -3
@@ -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 ;
Signature · 1 line
1.7.2.5
Kevin Wolf
AppliedAm 08.05.2011 09:01, schrieb Stefan Weil:
Quoted 6 lines
cppcheck report:
hw/xen_disk.c:309: style:
Variable 'len' is assigned a value that is never usedCc Kevin Wolf <[email protected]>Signed-off-by Stefan Weil <[email protected]>
Thanks, applied to the block branch.
Kevin