From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53973) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SiEJ1-0006sj-38 for qemu-devel@nongnu.org; Fri, 22 Jun 2012 20:34:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SiEIz-0007wl-85 for qemu-devel@nongnu.org; Fri, 22 Jun 2012 20:34:26 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:36193) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SiEIy-0007st-WC for qemu-devel@nongnu.org; Fri, 22 Jun 2012 20:34:25 -0400 Received: by mail-pb0-f45.google.com with SMTP id ro12so4321638pbb.4 for ; Fri, 22 Jun 2012 17:34:24 -0700 (PDT) Sender: fluxion From: Michael Roth Date: Fri, 22 Jun 2012 19:33:18 -0500 Message-Id: <1340411610-22596-15-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1340411610-22596-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1340411610-22596-1-git-send-email-mdroth@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH stable-1.1 14/26] qcow2: Silence false warning List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com From: Kevin Wolf 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 Signed-off-by: malc --- 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 4b3345b..c173fcd 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.4.1