From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:54141) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QwCEh-0008DJ-Qs for qemu-devel@nongnu.org; Wed, 24 Aug 2011 08:07:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QwCEg-0003Ff-VN for qemu-devel@nongnu.org; Wed, 24 Aug 2011 08:07:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:26148) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QwCEg-0003Fb-I6 for qemu-devel@nongnu.org; Wed, 24 Aug 2011 08:07:10 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p7OC79KH031548 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 24 Aug 2011 08:07:09 -0400 Received: from cleopatra.tlv.redhat.com (cleopatra.tlv.redhat.com [10.35.255.11]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p7OC79kU019743 for ; Wed, 24 Aug 2011 08:07:09 -0400 From: Avi Kivity Date: Wed, 24 Aug 2011 15:07:07 +0300 Message-Id: <1314187627-20975-1-git-send-email-avi@redhat.com> Subject: [Qemu-devel] [PATCH] vga: squash build error in vga_update_memory_access() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Newer gcc complains that base and size may be used uninitialized, even though it is clearly a false warning. Silence the warning by indicating to gcc that the code path triggering the warning cannot happen. Signed-off-by: Avi Kivity --- hw/vga.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/hw/vga.c b/hw/vga.c index 851fd68..b74e6e8 100644 --- a/hw/vga.c +++ b/hw/vga.c @@ -179,6 +179,8 @@ static void vga_update_memory_access(VGACommonState *s) base = 0xb8000; size = 0x8000; break; + default: + abort(); } region = g_malloc(sizeof(*region)); memory_region_init_alias(region, "vga.chain4", &s->vram, offset, size); -- 1.7.5.3