mirror of https://gitee.com/openkylin/qemu.git
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 <kwolf@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
a2d3f69530
commit
83e3f76c25
|
@ -551,6 +551,7 @@ fail:
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
int dummy;
|
int dummy;
|
||||||
dummy = update_refcount(bs, offset, cluster_offset - offset, -addend);
|
dummy = update_refcount(bs, offset, cluster_offset - offset, -addend);
|
||||||
|
(void)dummy;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in New Issue