x11/keymap,test/interactive-evdev: fix a couple of clang-analyzer warnings
From my analysis these values cannot be null, but the analyzer cannot see this. So assert it. Signed-off-by: Ran Benita <ran234@gmail.com>master
parent
2d9640651a
commit
daebdb5e08
|
@ -448,6 +448,7 @@ get_sym_maps(struct xkb_keymap *keymap, xcb_connection_t *conn,
|
|||
const xkb_layout_index_t group = j / wire_sym_map->width;
|
||||
const xkb_level_index_t level = j % wire_sym_map->width;
|
||||
|
||||
assert(key->groups[group].type != NULL);
|
||||
if (level < key->groups[group].type->num_levels &&
|
||||
wire_keysym != XKB_KEY_NoSymbol) {
|
||||
key->groups[group].levels[level].num_syms = 1;
|
||||
|
|
|
@ -203,6 +203,7 @@ get_keyboards(struct xkb_keymap *keymap,
|
|||
continue;
|
||||
}
|
||||
|
||||
assert(kbd != NULL);
|
||||
kbd->next = kbds;
|
||||
kbds = kbd;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue