Avoid declaring variables in for loop to avoid upsetting older GCC

Older GCC only allows "for (int i" in explicit c99 mode - there's probably
no reason that we can't enable that, but avoiding the construct for
a fast fix.
This commit is contained in:
Owen W. Taylor 2015-09-03 16:12:06 -04:00
parent 614d6bd0f8
commit e3db4ab16a

View File

@ -485,7 +485,8 @@ meta_wayland_keyboard_update_key_state (MetaWaylandKeyboard *keyboard,
{ {
gboolean mods_changed = FALSE; gboolean mods_changed = FALSE;
for (gint i = offset; i < key_vector_len * 8; i++) int i;
for (i = offset; i < key_vector_len * 8; i++)
{ {
gboolean set = (key_vector[i/8] & (1 << (i % 8))) != 0; gboolean set = (key_vector[i/8] & (1 << (i % 8))) != 0;