/* Handle the loss of connection to display DPY. ERROR_MESSAGE is
the text of an error message that lead to the connection loss. */
-static void
+static _Noreturn void
x_connection_closed (Display *dpy, const char *error_message, bool ioerror)
{
struct x_display_info *dpyinfo = x_display_info_for_display (dpy);
unbind_to (idx, Qnil);
clear_waiting_for_input ();
- /* Tell GCC not to suggest attribute 'noreturn' for this function. */
- IF_LINT (if (! terminal_list) return; )
-
/* Here, we absolutely have to use a non-local exit (e.g. signal, throw,
longjmp), because returning from this function would get us back into
Xlib's code which will directly call `exit'. */
It kills all frames on the display that we lost touch with.
If that was the only one, it prints an error message and kills Emacs. */
-static int
+static _Noreturn int
x_io_error_quitter (Display *display)
{
char buf[256];
snprintf (buf, sizeof buf, "Connection lost to X server '%s'",
DisplayString (display));
x_connection_closed (display, buf, true);
- return 0;
+ assume (false);
}
\f
/* Changing the font of the frame. */