qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] vga: squash build error in vga_update_memory_access()
@ 2011-08-24 12:07 Avi Kivity
  2011-08-24 12:46 ` Jan Kiszka
  0 siblings, 1 reply; 8+ messages in thread
From: Avi Kivity @ 2011-08-24 12:07 UTC (permalink / raw)
  To: qemu-devel

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 <avi@redhat.com>
---
 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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-08-25 22:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-24 12:07 [Qemu-devel] [PATCH] vga: squash build error in vga_update_memory_access() Avi Kivity
2011-08-24 12:46 ` Jan Kiszka
2011-08-24 12:58   ` Avi Kivity
2011-08-24 13:00     ` Jan Kiszka
2011-08-24 13:07       ` Avi Kivity
2011-08-24 21:00       ` Anthony Liguori
2011-08-25  9:10         ` [Qemu-devel] [PATCH] vga: Silence bogus gcc warning about uninitialized variables Jan Kiszka
2011-08-25 22:41           ` Anthony Liguori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).