# HG changeset patch # User Jim Blandy # Date 723680282 0 # Node ID fe6f6e55182fee8d56de7fc454e56dc3dde0695a # Parent fd573317f46818d4eb5f7c616a3bc8559638d4ff * 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. diff -r fd573317f468 -r fe6f6e55182f src/keyboard.c --- a/src/keyboard.c Sun Dec 06 22:17:30 1992 +0000 +++ b/src/keyboard.c Sun Dec 06 22:18:02 1992 +0000 @@ -250,6 +250,9 @@ /* Pointer to next place to store character in kbd_buffer. This may be kbd_buffer + KBD_BUFFER_SIZE, meaning that the next character should go in kbd_buffer[0]. */ +#ifdef __STDC__ +volatile +#endif static struct input_event *kbd_store_ptr; /* The above pair of variables forms a "queue empty" flag. When we @@ -3577,7 +3580,10 @@ discard_tty_input (); - kbd_fetch_ptr = kbd_store_ptr; + /* Without the cast, GCC complains that this assignment loses the + volatile qualifier of kbd_store_ptr. Is there anything wrong + with that? */ + kbd_fetch_ptr = (struct input_event *) kbd_store_ptr; input_pending = 0; return Qnil;