From: Paul Eggert Date: Thu, 24 Mar 2011 08:03:03 +0000 (-0700) Subject: * keyboard.c (syms_of_keyboard): Use the same style as later X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~460^2~15^2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9a2c6e0545bc418137abab8fb675f53c4f461853;p=emacs.git * 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. --- 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);