• Adam Jackson's avatar
    xkb: Silence some compiler warnings · 83913de2
    Adam Jackson authored
    Of the form:
    ../xkb/XKBGAlloc.c: In function ‘SrvXkbAddGeomKeyAlias’:
    ../xkb/XKBGAlloc.c:591:13: warning: ‘strncpy’ specified bound 4 equals destination size [-Wstringop-truncation]
                 strncpy(alias->real, realStr, XkbKeyNameLength);
    This is intentional; the code that reads from these fields never reads
    more than 4 bytes anyway. Rephrase things in terms of memcpy so that's
    clear. Obviously this is awful but in XKB awful is par.
    Signed-off-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
    Acked-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
XKBGAlloc.c 26.1 KB