[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] vga: squash build error in vga_update_memory_ac
From: |
Jan Kiszka |
Subject: |
Re: [Qemu-devel] [PATCH] vga: squash build error in vga_update_memory_access() |
Date: |
Wed, 24 Aug 2011 14:46:26 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
On 2011-08-24 14:07, Avi Kivity wrote:
> Newer gcc complains that base and size may be used uninitialized, even though
> it is clearly a false warning.
Mmh, gcc is getting dumber again.
> 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);
...or just make the last case default?
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
- [Qemu-devel] [PATCH] vga: squash build error in vga_update_memory_access(), Avi Kivity, 2011/08/24
- Re: [Qemu-devel] [PATCH] vga: squash build error in vga_update_memory_access(),
Jan Kiszka <=
- Re: [Qemu-devel] [PATCH] vga: squash build error in vga_update_memory_access(), Avi Kivity, 2011/08/24
- Re: [Qemu-devel] [PATCH] vga: squash build error in vga_update_memory_access(), Jan Kiszka, 2011/08/24
- Re: [Qemu-devel] [PATCH] vga: squash build error in vga_update_memory_access(), Avi Kivity, 2011/08/24
- Re: [Qemu-devel] [PATCH] vga: squash build error in vga_update_memory_access(), Anthony Liguori, 2011/08/24
- [Qemu-devel] [PATCH] vga: Silence bogus gcc warning about uninitialized variables, Jan Kiszka, 2011/08/25
- Re: [Qemu-devel] [PATCH] vga: Silence bogus gcc warning about uninitialized variables, Anthony Liguori, 2011/08/25