]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
qcow2: Silence false warning
authorKevin Wolf <kwolf@redhat.com>
Fri, 15 Jun 2012 11:43:18 +0000 (13:43 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Mon, 25 Jun 2012 13:53:20 +0000 (08:53 -0500)
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>
block/qcow2-cluster.c

index 4b3345b11b3743f68417a15e54238c807896cedc..c173fcd488e2fecc9be1258dec8fe32a3d1e5d9b 100644 (file)
@@ -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);