From 83e3f76c2565a06877dc415ac9f5cf6f1c75614c Mon Sep 17 00:00:00 2001 From: Blue Swirl Date: Wed, 13 Oct 2010 18:38:07 +0000 Subject: block: avoid a write only variable Compiling with GCC 4.6.0 20100925 produced a warning: /src/qemu/block/qcow2-refcount.c: In function 'update_refcount': /src/qemu/block/qcow2-refcount.c:552:13: error: variable 'dummy' set but not used [-Werror=unused-but-set-variable] Fix by adding a dummy cast so that the result is not unused. Acked-by: Kevin Wolf Signed-off-by: Blue Swirl --- block/qcow2-refcount.c | 1 + 1 file changed, 1 insertion(+) (limited to 'block') diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index 7082601f59..0efb6760cb 100644 --- a/block/qcow2-refcount.c +++ b/block/qcow2-refcount.c @@ -551,6 +551,7 @@ fail: if (ret < 0) { int dummy; dummy = update_refcount(bs, offset, cluster_offset - offset, -addend); + (void)dummy; } return ret; -- cgit v1.2.3