From e3db4ab16a65be692c969088a6e1487dde305fc4 Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Thu, 3 Sep 2015 16:12:06 -0400 Subject: [PATCH] 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. --- src/wayland/meta-wayland-keyboard.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wayland/meta-wayland-keyboard.c b/src/wayland/meta-wayland-keyboard.c index 8d136c9b9..c4836cb7b 100644 --- a/src/wayland/meta-wayland-keyboard.c +++ b/src/wayland/meta-wayland-keyboard.c @@ -485,7 +485,8 @@ meta_wayland_keyboard_update_key_state (MetaWaylandKeyboard *keyboard, { 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;