[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 01/12] block: avoid a write only variable
From: |
Blue Swirl |
Subject: |
[Qemu-devel] [PATCH 01/12] block: avoid a write only variable |
Date: |
Fri, 8 Oct 2010 21:23:22 +0000 |
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.
Signed-off-by: Blue Swirl <address@hidden>
---
block/qcow2-refcount.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c
index 7082601..0efb676 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;
--
1.6.2.4
- [Qemu-devel] [PATCH 01/12] block: avoid a write only variable,
Blue Swirl <=