diff options
| author | Paul Eggert | 2016-05-30 16:09:25 -0700 |
|---|---|---|
| committer | Paul Eggert | 2016-05-30 16:13:04 -0700 |
| commit | 237244bbd5ce753bcdf79634561de515bd76c687 (patch) | |
| tree | fa395a0e84b27c4755d3fc3ff0f06b1bfdd2b693 /src/xterm.c | |
| parent | cb379cbb7fc617f897e7dbc3ce45bf99ea3d1f87 (diff) | |
| download | emacs-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/xterm.c')
| -rw-r--r-- | src/xterm.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/xterm.c b/src/xterm.c index beef61d1618..9fb19a16f60 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -9393,7 +9393,7 @@ static char *error_msg; | |||
| 9393 | /* Handle the loss of connection to display DPY. ERROR_MESSAGE is | 9393 | /* Handle the loss of connection to display DPY. ERROR_MESSAGE is |
| 9394 | the text of an error message that lead to the connection loss. */ | 9394 | the text of an error message that lead to the connection loss. */ |
| 9395 | 9395 | ||
| 9396 | static void | 9396 | static _Noreturn void |
| 9397 | x_connection_closed (Display *dpy, const char *error_message, bool ioerror) | 9397 | x_connection_closed (Display *dpy, const char *error_message, bool ioerror) |
| 9398 | { | 9398 | { |
| 9399 | struct x_display_info *dpyinfo = x_display_info_for_display (dpy); | 9399 | struct x_display_info *dpyinfo = x_display_info_for_display (dpy); |
| @@ -9491,9 +9491,6 @@ For details, see etc/PROBLEMS.\n", | |||
| 9491 | unbind_to (idx, Qnil); | 9491 | unbind_to (idx, Qnil); |
| 9492 | clear_waiting_for_input (); | 9492 | clear_waiting_for_input (); |
| 9493 | 9493 | ||
| 9494 | /* Tell GCC not to suggest attribute 'noreturn' for this function. */ | ||
| 9495 | IF_LINT (if (! terminal_list) return; ) | ||
| 9496 | |||
| 9497 | /* Here, we absolutely have to use a non-local exit (e.g. signal, throw, | 9494 | /* Here, we absolutely have to use a non-local exit (e.g. signal, throw, |
| 9498 | longjmp), because returning from this function would get us back into | 9495 | longjmp), because returning from this function would get us back into |
| 9499 | Xlib's code which will directly call `exit'. */ | 9496 | Xlib's code which will directly call `exit'. */ |
| @@ -9559,7 +9556,7 @@ x_error_quitter (Display *display, XErrorEvent *event) | |||
| 9559 | It kills all frames on the display that we lost touch with. | 9556 | It kills all frames on the display that we lost touch with. |
| 9560 | If that was the only one, it prints an error message and kills Emacs. */ | 9557 | If that was the only one, it prints an error message and kills Emacs. */ |
| 9561 | 9558 | ||
| 9562 | static int | 9559 | static _Noreturn int |
| 9563 | x_io_error_quitter (Display *display) | 9560 | x_io_error_quitter (Display *display) |
| 9564 | { | 9561 | { |
| 9565 | char buf[256]; | 9562 | char buf[256]; |
| @@ -9567,7 +9564,7 @@ x_io_error_quitter (Display *display) | |||
| 9567 | snprintf (buf, sizeof buf, "Connection lost to X server '%s'", | 9564 | snprintf (buf, sizeof buf, "Connection lost to X server '%s'", |
| 9568 | DisplayString (display)); | 9565 | DisplayString (display)); |
| 9569 | x_connection_closed (display, buf, true); | 9566 | x_connection_closed (display, buf, true); |
| 9570 | return 0; | 9567 | assume (false); |
| 9571 | } | 9568 | } |
| 9572 | 9569 | ||
| 9573 | /* Changing the font of the frame. */ | 9570 | /* Changing the font of the frame. */ |