From: Stefan Weil <weil@mail.berlios.de>
To: QEMU Developers <qemu-devel@nongnu.org>
Cc: Kevin Wolf <kwolf@redhat.com>
Subject: [Qemu-devel] [PATCH] hw/xen_disk: Remove unused local variable
Date: Sun, 8 May 2011 09:01:52 +0200 [thread overview]
Message-ID: <1304838112-28736-1-git-send-email-weil@mail.berlios.de> (raw)
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
next reply other threads:[~2011-05-08 7:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-08 7:01 Stefan Weil [this message]
2011-05-09 8:34 ` [Qemu-devel] [PATCH] hw/xen_disk: Remove unused local variable Kevin Wolf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1304838112-28736-1-git-send-email-weil@mail.berlios.de \
--to=weil@mail.berlios.de \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).