summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2012-06-15 13:43:18 +0200
committerMichael Roth <mdroth@linux.vnet.ibm.com>2012-06-25 08:53:20 -0500
commitb4fcb4b4995b292b6013600af78d37416c6ebb34 (patch)
tree2a6ee6faba62a01d8f9c55d915a0d3351e4e53ed
parentkvm: i8254: Fix conversion of in-kernel to userspace state (diff)
downloadqemu-kvm-b4fcb4b4995b292b6013600af78d37416c6ebb34.tar.gz
qemu-kvm-b4fcb4b4995b292b6013600af78d37416c6ebb34.tar.bz2
qemu-kvm-b4fcb4b4995b292b6013600af78d37416c6ebb34.zip
qcow2: Silence false warning
Some gcc versions seem not to be able to figure out that the switch statement covers all possible values and that c is therefore always initialised. Add a default branch for them. Reported-by: malc <av1474@comtv.ru> Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: malc <av1474@comtv.ru> (cherry picked from commit 1417d7e40eaf1418333fb2ec43d0c7f4245b10e7) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
-rw-r--r--block/qcow2-cluster.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c
index 4b3345b11..c173fcd48 100644
--- a/block/qcow2-cluster.c
+++ b/block/qcow2-cluster.c
@@ -471,6 +471,8 @@ int qcow2_get_cluster_offset(BlockDriverState *bs, uint64_t offset,
QCOW_OFLAG_COMPRESSED | QCOW_OFLAG_ZERO);
*cluster_offset &= L2E_OFFSET_MASK;
break;
+ default:
+ abort();
}
qcow2_cache_put(bs, s->l2_table_cache, (void**) &l2_table);