• Vitaly Buka's avatar
    Fix union XEvent initialization · 104cb383
    Vitaly Buka authored
    C/C++ for "XEvent = {}" promise to zero initialize only the first member of the
    union. The tails of larger member can be uninitialized.
    
    Detected with -ftrivial-auto-var-init=pattern.
    
    XEvent member sizes on x86_64
    40 xany
    96 xkey
    96 xbutton
    96 xmotion
    104 xcrossing
    48 xfocus
    64 xexpose
    72 xgraphicsexpose
    48 xnoexpose
    48 xvisibility
    72 xcreatewindow
    48 xdestroywindow
    56 xunmap
    56 xmap
    48 xmaprequest
    72 xreparent
    88 xconfigure
    56 xgravity
    48 xresizerequest
    96 xconfigurerequest
    56 xcirculate
    56 xcirculaterequest
    64 xproperty
    56 xselectionclear
    80 xselectionrequest
    72 xselection
    56 xcolormap
    96 xclient
    56 xmapping
    40 xerror
    72 xkeymap
    40 xgeneric
    56 xcookie
    192 pad
    
    Bug: 977230
    
    Change-Id: I7838e5f68b6320e067f9c446222a38fdcd35bdd8
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1842505Reviewed-by: default avatarThomas Anderson <thomasanderson@chromium.org>
    Reviewed-by: default avatarSadrul Chowdhury <sadrul@chromium.org>
    Commit-Queue: Vitaly Buka <vitalybuka@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#703384}
    104cb383
ui_controls_factory_aurax11.cc 8.76 KB