]> git.proxmox.com Git - mirror_qemu.git/commitdiff
block: avoid a write only variable
authorBlue Swirl <blauwirbel@gmail.com>
Wed, 13 Oct 2010 18:38:07 +0000 (18:38 +0000)
committerBlue Swirl <blauwirbel@gmail.com>
Wed, 13 Oct 2010 18:38:07 +0000 (18:38 +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.

Acked-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
block/qcow2-refcount.c

index 7082601f598981ff55b90f70fd6a84f16f0f7aec..0efb6760cbb9698522e6ade2d9eff578b4e56331 100644 (file)
@@ -551,6 +551,7 @@ fail:
     if (ret < 0) {
         int dummy;
         dummy = update_refcount(bs, offset, cluster_offset - offset, -addend);
+        (void)dummy;
     }
 
     return ret;