Ticket #4103: mc-4103-cid-widget-common.c-fix-uninitialized-scalar-variable.patch

File mc-4103-cid-widget-common.c-fix-uninitialized-scalar-variable.patch, 997 bytes (added by and, 20 months ago)
  • lib/widget/widget-common.c

    From c16d411841025121267b1b72e85a429cde0a3817 Mon Sep 17 00:00:00 2001
    From: Andreas Mohr <and@gmx.li>
    Date: Mon, 7 Dec 2020 13:41:18 +0000
    Subject: [PATCH] (widget-common.c) fix uninitialized scalar variable
    
    Fix uninitialized scalar variable
    
    found by Coverity
    coverity id #32631
    
    Signed-off-by: Andreas Mohr <and@gmx.li>
    ---
     lib/widget/widget-common.c | 8 ++------
     1 file changed, 2 insertions(+), 6 deletions(-)
    
    diff --git a/lib/widget/widget-common.c b/lib/widget/widget-common.c
    index 405269ff9..00ca8b094 100644
    a b mouse_get_local (const Gpm_Event * global, const Widget * w) 
    798798{ 
    799799    Gpm_Event local; 
    800800 
     801    memset(&local, 0, sizeof(Gpm_Event)); 
     802 
    801803    local.buttons = global->buttons; 
    802 #ifdef HAVE_LIBGPM 
    803     local.clicks = 0; 
    804     local.margin = 0; 
    805     local.modifiers = 0; 
    806     local.vc = 0; 
    807 #endif 
    808804    local.x = global->x - w->x; 
    809805    local.y = global->y - w->y; 
    810806    local.type = global->type;