aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJim Blandy1992-12-06 22:18:02 +0000
committerJim Blandy1992-12-06 22:18:02 +0000
commitff0b5f4c678edf11ba88814089f336e8bdb75e3e (patch)
tree9e7371f644c6b049c537c99560d9f3251794bd72 /src
parenta46595273a936b8bd4bf9e35ee581ce9868d1522 (diff)
downloademacs-ff0b5f4c678edf11ba88814089f336e8bdb75e3e.tar.gz
emacs-ff0b5f4c678edf11ba88814089f336e8bdb75e3e.zip
* keyboard.c (kbd_store_ptr): Declare this to be volatile, if
__STDC__ is #defined. (Fdiscard_input): Use cast to keep GCC from complaining about the assignment of kbd_store_ptr to kbd_fetch_ptr.
Diffstat (limited to 'src')
-rw-r--r--src/keyboard.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index a9e73d2995c..c0d8bfa5a97 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -250,6 +250,9 @@ static struct input_event *kbd_fetch_ptr;
250/* Pointer to next place to store character in kbd_buffer. This 250/* Pointer to next place to store character in kbd_buffer. This
251 may be kbd_buffer + KBD_BUFFER_SIZE, meaning that the next 251 may be kbd_buffer + KBD_BUFFER_SIZE, meaning that the next
252 character should go in kbd_buffer[0]. */ 252 character should go in kbd_buffer[0]. */
253#ifdef __STDC__
254volatile
255#endif
253static struct input_event *kbd_store_ptr; 256static struct input_event *kbd_store_ptr;
254 257
255/* The above pair of variables forms a "queue empty" flag. When we 258/* The above pair of variables forms a "queue empty" flag. When we
@@ -3577,7 +3580,10 @@ Also cancel any kbd macro being defined.")
3577 3580
3578 discard_tty_input (); 3581 discard_tty_input ();
3579 3582
3580 kbd_fetch_ptr = kbd_store_ptr; 3583 /* Without the cast, GCC complains that this assignment loses the
3584 volatile qualifier of kbd_store_ptr. Is there anything wrong
3585 with that? */
3586 kbd_fetch_ptr = (struct input_event *) kbd_store_ptr;
3581 input_pending = 0; 3587 input_pending = 0;
3582 3588
3583 return Qnil; 3589 return Qnil;