qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] block/rbd: Remove unused local variable
@ 2011-05-07 20:15 Stefan Weil
  2011-05-22 12:07 ` Stefan Weil
  0 siblings, 1 reply; 10+ messages in thread
From: Stefan Weil @ 2011-05-07 20:15 UTC (permalink / raw)
  To: QEMU Developers; +Cc: Kevin Wolf, Christian Brunner

cppcheck report:
rbd.c:246: style: Variable 'snap' is assigned a value that is never used

Remove snap and the related code.

Cc: Christian Brunner <chb@muc.de>
Cc: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
---
 block/rbd.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/block/rbd.c b/block/rbd.c
index 249a590..5c7d44e 100644
--- a/block/rbd.c
+++ b/block/rbd.c
@@ -524,7 +524,6 @@ static int rbd_open(BlockDriverState *bs, const char *filename, int flags)
     RbdHeader1 *header;
     char pool[RBD_MAX_SEG_NAME_SIZE];
     char snap_buf[RBD_MAX_SEG_NAME_SIZE];
-    char *snap = NULL;
     char *hbuf = NULL;
     int r;
 
@@ -533,9 +532,6 @@ static int rbd_open(BlockDriverState *bs, const char *filename, int flags)
                       s->name, sizeof(s->name)) < 0) {
         return -EINVAL;
     }
-    if (snap_buf[0] != '\0') {
-        snap = snap_buf;
-    }
 
     if ((r = rados_initialize(0, NULL)) < 0) {
         error_report("error initializing");
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-06-14  7:59 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-07 20:15 [Qemu-devel] [PATCH] block/rbd: Remove unused local variable Stefan Weil
2011-05-22 12:07 ` Stefan Weil
2011-05-23  9:01   ` Christian Brunner
2011-05-23 10:13     ` Stefan Hajnoczi
2011-05-23 10:26     ` Kevin Wolf
2011-05-27 18:32       ` Stefan Weil
2011-05-27 20:46         ` Christian Brunner
2011-06-10 20:05           ` [Qemu-devel] [PATCH v2] " Stefan Weil
2011-06-13 18:06             ` Josh Durgin
2011-06-14  8:01             ` 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).