• Show log

    Commit

  • Hash : 5ef19bcf
    Author : Pierre Le Marre
    Date : 2025-02-13T17:58:21

    xkbcomp: Fix incorrect memory comparison
    
    Spotted by clang-tidy:
    
    ```
    ../src/keymap-priv.c:146:16: warning: comparing object representation of
                                 type 'union xkb_action' which does not have
                                 a unique object representation; consider
                                 comparing the members of the object manually
                                 [bugprone-suspicious-memory-comparison]
    ````
    
    Indeed, from “EXP42-C. Do not compare padding data”[^1]:
    
    > unnamed members of objects of structure and union type do not participate
    > in initialization. Unnamed members of structure objects have indeterminate
    > representation even after initialization.
    
    Fixed by using a dedicated comparison function for `union xkb_action`.
    
    [^1]: https://wiki.sei.cmu.edu/confluence/display/c/EXP42-C.+Do+not+compare+padding+data
    

  • Properties

  • Git HTTP https://git.kmx.io/kc3-lang/libxkbcommon.git
    Git SSH git@git.kmx.io:kc3-lang/libxkbcommon.git
    Public access ? public
    Description

    keymap handling library for toolkits and window systems

    Users
    thodg_m kc3_lang_org thodg_w www_kmx_io thodg thodg_l
    Tags