[mutter] Avoid declaring variables in for loop to avoid upsetting older GCC
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] Avoid declaring variables in for loop to avoid upsetting older GCC
- Date: Thu, 3 Sep 2015 20:14:29 +0000 (UTC)
commit e3db4ab16a65be692c969088a6e1487dde305fc4
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Thu Sep 3 16:12:06 2015 -0400
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 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/wayland/meta-wayland-keyboard.c b/src/wayland/meta-wayland-keyboard.c
index 8d136c9..c4836cb 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]