diff mbox series

[v2,10/10] hw/display/vga:Remove redundant statement in vga_draw_graphic()

Message ID 20200825112447.126308-11-kuhn.chenqun@huawei.com (mailing list archive)
State New, archived
Headers show
Series trivial patchs for static code analyzer fixes | expand

Commit Message

Chen Qun Aug. 25, 2020, 11:24 a.m. UTC
Clang static code analyzer show warning:
hw/display/vga.c:1677:9: warning: Value stored to 'update' is never read
        update = full_update;
        ^        ~~~~~~~~~~~

Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
---
Cc: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/display/vga.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Li Qiang Aug. 26, 2020, 1:54 a.m. UTC | #1
Chen Qun <kuhn.chenqun@huawei.com> 于2020年8月25日周二 下午7:33写道:
>
> Clang static code analyzer show warning:
> hw/display/vga.c:1677:9: warning: Value stored to 'update' is never read
>         update = full_update;
>         ^        ~~~~~~~~~~~
>
> Reported-by: Euler Robot <euler.robot@huawei.com>
> Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>

Reviewed-by: Li Qiang <liq3ea@gmail.com>

> ---
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  hw/display/vga.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/hw/display/vga.c b/hw/display/vga.c
> index 061fd9ab8f..836ad50c7b 100644
> --- a/hw/display/vga.c
> +++ b/hw/display/vga.c
> @@ -1674,7 +1674,6 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
>          if (!(s->cr[VGA_CRTC_MODE] & 2)) {
>              addr = (addr & ~0x8000) | ((y1 & 2) << 14);
>          }
> -        update = full_update;
>          page0 = addr & s->vbe_size_mask;
>          page1 = (addr + bwidth - 1) & s->vbe_size_mask;
>          if (full_update) {
> --
> 2.23.0
>
>
diff mbox series

Patch

diff --git a/hw/display/vga.c b/hw/display/vga.c
index 061fd9ab8f..836ad50c7b 100644
--- a/hw/display/vga.c
+++ b/hw/display/vga.c
@@ -1674,7 +1674,6 @@  static void vga_draw_graphic(VGACommonState *s, int full_update)
         if (!(s->cr[VGA_CRTC_MODE] & 2)) {
             addr = (addr & ~0x8000) | ((y1 & 2) << 14);
         }
-        update = full_update;
         page0 = addr & s->vbe_size_mask;
         page1 = (addr + bwidth - 1) & s->vbe_size_mask;
         if (full_update) {