From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:49413) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QInv5-0002ZW-P6 for qemu-devel@nongnu.org; Sat, 07 May 2011 16:16:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QInv4-00039w-K9 for qemu-devel@nongnu.org; Sat, 07 May 2011 16:16:07 -0400 Received: from moutng.kundenserver.de ([212.227.126.187]:63466) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QInv4-00039i-8J for qemu-devel@nongnu.org; Sat, 07 May 2011 16:16:06 -0400 From: Stefan Weil Date: Sat, 7 May 2011 22:15:57 +0200 Message-Id: <1304799357-19281-1-git-send-email-weil@mail.berlios.de> Subject: [Qemu-devel] [PATCH] block/rbd: Remove unused local variable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 Cc: Kevin Wolf Signed-off-by: Stefan Weil --- 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