[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] Dead Code Removal: removing support for DEPTH !
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH] Dead Code Removal: removing support for DEPTH != 32. |
Date: |
Thu, 16 Mar 2017 15:30:45 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 |
On 16/03/2017 10:20, address@hidden wrote:
> static draw_line_func * draw_line8_funcs[] = {
> - draw_line8_8,
> - draw_line8_15,
> - draw_line8_16,
> draw_line8_32,
> draw_line8_32bgr,
> - draw_line8_15bgr,
> - draw_line8_16bgr,
> };
>
> static draw_line_func * draw_line16_funcs[] = {
> - draw_line16_8,
> - draw_line16_15,
> - draw_line16_16,
> draw_line16_32,
> draw_line16_32bgr,
> - draw_line16_15bgr,
> - draw_line16_16bgr,
> };
>
> static draw_line_func * draw_line32_funcs[] = {
> - draw_line32_8,
> - draw_line32_15,
> - draw_line32_16,
> draw_line32_32,
> draw_line32_32bgr,
> - draw_line32_15bgr,
> - draw_line32_16bgr,
> };
>
> static draw_hwc_line_func * draw_hwc_line_funcs[] = {
> - draw_hwc_line_8,
> - draw_hwc_line_15,
> - draw_hwc_line_16,
> draw_hwc_line_32,
> draw_hwc_line_32bgr,
> - draw_hwc_line_15bgr,
> - draw_hwc_line_16bgr,
> };
>
> static inline int get_depth_index(DisplaySurface *surface)
In fact, as in your cirrus-vga patch, here you adjusted the arrays but
not its users. This would never work, because get_depth_index will
return 3. The value is out of bounds for these 2-element arrays.
Paolo