qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] vga: squash build error in vga_update_memory_access


From: Avi Kivity
Subject: [Qemu-devel] [PATCH] vga: squash build error in vga_update_memory_access()
Date: Wed, 24 Aug 2011 15:07:07 +0300

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 <address@hidden>
---
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]