mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 06:00:22 +00:00
Help static analysis with an assertion
It is hard for clang to see that layouts will always be smaller than num_layouts, so just assert that.
This commit is contained in:
parent
0f096d6ad9
commit
ec39ddee63
@ -412,6 +412,7 @@ update_direction (GdkWaylandKeymap *keymap)
|
||||
gint layouts, layout;
|
||||
|
||||
layouts = xkb_keymap_num_layouts_for_key (keymap->xkb_keymap, key);
|
||||
g_assert (layouts <= num_layouts);
|
||||
for (layout = 0; layout < layouts; layout++)
|
||||
{
|
||||
const xkb_keysym_t *syms;
|
||||
|
Loading…
Reference in New Issue
Block a user