From 9a2c6e0545bc418137abab8fb675f53c4f461853 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 24 Mar 2011 01:03:03 -0700 Subject: [PATCH] * keyboard.c (syms_of_keyboard): Use the same style as later in this function when indexing through an array. This also works around GCC bug 48267. --- src/ChangeLog | 4 ++++ src/keyboard.c | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 998e2014c69..88190f46179 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2011-03-24 Paul Eggert + * keyboard.c (syms_of_keyboard): Use the same style as later + in this function when indexing through an array. This also + works around GCC bug 48267. + * image.c (tiff_load): Fix off-by-one image count (Bug#8336). * xselect.c (x_check_property_data): Return correct size (Bug#8335). diff --git a/src/keyboard.c b/src/keyboard.c index fc8622de0a1..72d955637b3 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -11574,12 +11574,12 @@ syms_of_keyboard (void) last_point_position_window = Qnil; { - const struct event_head *p; + int i; + int len = sizeof (head_table) / sizeof (head_table[0]); - for (p = head_table; - p < head_table + (sizeof (head_table) / sizeof (head_table[0])); - p++) + for (i = 0; i < len; i++) { + const struct event_head *p = &head_table[i]; *p->var = intern_c_string (p->name); staticpro (p->var); Fput (*p->var, Qevent_kind, *p->kind); -- 2.39.5