From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:58700) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SfUw9-00054z-Iv for qemu-devel@nongnu.org; Fri, 15 Jun 2012 07:43:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SfUw7-0003FH-K9 for qemu-devel@nongnu.org; Fri, 15 Jun 2012 07:43:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:30977) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SfUw7-0003F3-CF for qemu-devel@nongnu.org; Fri, 15 Jun 2012 07:43:31 -0400 From: Kevin Wolf Date: Fri, 15 Jun 2012 13:43:18 +0200 Message-Id: <1339760598-6459-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PATCH] qcow2: Silence false warning List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com 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 Signed-off-by: Kevin Wolf --- block/qcow2-cluster.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c index b663b9f..d7e0e19 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); -- 1.7.6.5