aboutsummaryrefslogtreecommitdiffstats
path: root/src/keyboard.c
diff options
context:
space:
mode:
authorPaul Eggert2016-05-30 16:09:25 -0700
committerPaul Eggert2016-05-30 16:13:04 -0700
commit237244bbd5ce753bcdf79634561de515bd76c687 (patch)
treefa395a0e84b27c4755d3fc3ff0f06b1bfdd2b693 /src/keyboard.c
parentcb379cbb7fc617f897e7dbc3ce45bf99ea3d1f87 (diff)
downloademacs-237244bbd5ce753bcdf79634561de515bd76c687.tar.gz
emacs-237244bbd5ce753bcdf79634561de515bd76c687.zip
Omit IF_LINT code that no longer seems needed
Nowadays GCC is smarter, or the Emacs code has mutated, or both, and now is as good a time as any to remove uses of IF_LINT that now seem to be unnecessary. * lib-src/emacsclient.c (set_local_socket): * lib-src/movemail.c (main) [MAIL_USE_MAILLOCK && HAVE_TOUCHLOCK]: * src/buffer.c (fix_start_end_in_overlays, fix_overlays_before): * src/casefiddle.c (casify_region): * src/charset.c (load_charset_map): * src/coding.c (decode_coding_object, encode_coding_object): * src/data.c (Fmake_variable_buffer_local, Fmake_local_variable) (cons_to_unsigned, cons_to_signed): * src/frame.c (make_frame, x_set_frame_parameters): * src/keyboard.c (read_event_from_main_queue): * src/regex.c (regex_compile): * src/syntax.c (back_comment): * src/window.c (Frecenter): * src/xfaces.c (Fx_list_fonts): Remove IF_LINT that no longer seems necessary. * src/image.c (png_load_body, jpeg_load_body): Simplify use of IF_LINT. * src/keyboard.c (read_char): Use IF_LINT (volatile) rather than a pragma dance to pacify GCC -Wclobbered. * src/xdisp.c (x_produce_glyphs): Rewrite to avoid need for IF_LINT. * src/xterm.c (x_connection_closed): Now _Noreturn, which should mean we do not need IF_LINT any more. (x_io_error_quitter): Now _Noreturn. Put an 'assume (false)’ at the end, to forestall warnings from older compilers.
Diffstat (limited to 'src/keyboard.c')
-rw-r--r--src/keyboard.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index 2b5d514cc40..d2976cb7359 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -2122,7 +2122,7 @@ read_event_from_main_queue (struct timespec *end_time,
2122{ 2122{
2123 Lisp_Object c = Qnil; 2123 Lisp_Object c = Qnil;
2124 sys_jmp_buf save_jump; 2124 sys_jmp_buf save_jump;
2125 KBOARD *kb IF_LINT (= NULL); 2125 KBOARD *kb;
2126 2126
2127 start: 2127 start:
2128 2128
@@ -2280,11 +2280,6 @@ read_decoded_event_from_main_queue (struct timespec *end_time,
2280 } 2280 }
2281} 2281}
2282 2282
2283#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
2284# pragma GCC diagnostic push
2285# pragma GCC diagnostic ignored "-Wclobbered"
2286#endif
2287
2288/* Read a character from the keyboard; call the redisplay if needed. */ 2283/* Read a character from the keyboard; call the redisplay if needed. */
2289/* commandflag 0 means do not autosave, but do redisplay. 2284/* commandflag 0 means do not autosave, but do redisplay.
2290 -1 means do not redisplay, but do autosave. 2285 -1 means do not redisplay, but do autosave.
@@ -2317,7 +2312,9 @@ read_char (int commandflag, Lisp_Object map,
2317 Lisp_Object prev_event, 2312 Lisp_Object prev_event,
2318 bool *used_mouse_menu, struct timespec *end_time) 2313 bool *used_mouse_menu, struct timespec *end_time)
2319{ 2314{
2320 Lisp_Object c; 2315 /* IF_LINT (volatile) works around GCC bug 54561. */
2316 Lisp_Object IF_LINT (volatile) c;
2317
2321 ptrdiff_t jmpcount; 2318 ptrdiff_t jmpcount;
2322 sys_jmp_buf local_getcjmp; 2319 sys_jmp_buf local_getcjmp;
2323 sys_jmp_buf save_jump; 2320 sys_jmp_buf save_jump;
@@ -3125,10 +3122,6 @@ read_char (int commandflag, Lisp_Object map,
3125 return c; 3122 return c;
3126} 3123}
3127 3124
3128#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
3129# pragma GCC diagnostic pop
3130#endif
3131
3132/* Record a key that came from a mouse menu. 3125/* Record a key that came from a mouse menu.
3133 Record it for echoing, for this-command-keys, and so on. */ 3126 Record it for echoing, for this-command-keys, and so on. */
3134 3127