diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2020-06-24 19:24:30 +0800 |
---|---|---|
committer | Chun-wei Fan <fanchunwei@src.gnome.org> | 2020-06-24 19:26:34 +0800 |
commit | 9c2a63ae5be02205714a84bbf8a5645ff926ab90 (patch) | |
tree | 4077e6c7f0dde6e7b9f0a79718cd649426f4eadf /pango | |
parent | 39080c4d55784091e6d265b9a04975a28cbbec7f (diff) | |
download | pango-9c2a63ae5be02205714a84bbf8a5645ff926ab90.tar.gz |
pango-attributes.c: Fix on older compilers
Avoid declaring a variables in a for loop initialization, so that we
won't accidentally break building on older compilers.
Diffstat (limited to 'pango')
-rw-r--r-- | pango/pango-attributes.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pango/pango-attributes.c b/pango/pango-attributes.c index 218ffade..5f844639 100644 --- a/pango/pango-attributes.c +++ b/pango/pango-attributes.c @@ -1868,6 +1868,7 @@ pango_attr_list_equal (PangoAttrList *list, { GPtrArray *attrs, *other_attrs; guint64 skip_bitmask = 0; + guint i; if (list == other_list) return TRUE; @@ -1884,12 +1885,13 @@ pango_attr_list_equal (PangoAttrList *list, if (attrs->len != other_attrs->len) return FALSE; - for (guint i = 0; i < attrs->len; i++) + for (i = 0; i < attrs->len; i++) { PangoAttribute *attr = g_ptr_array_index (attrs, i); gboolean attr_equal = FALSE; + guint other_attr_index; - for (guint other_attr_index = 0; other_attr_index < other_attrs->len; other_attr_index++) + for (other_attr_index = 0; other_attr_index < other_attrs->len; other_attr_index++) { PangoAttribute *other_attr = g_ptr_array_index (other_attrs, other_attr_index); guint64 other_attr_bitmask = other_attr_index < 64 ? 1 << other_attr_index : 0; |