Pacify GCC when configured --with-x-toolkit=no

Without these changes, Emacs does not build on Fedora 26 x86-64
when configured --with-x-toolkit=no --enable-gcc-warnings.
* oldXMenu/Activate.c (XMenuActivate): Add FALLTHROUGH.
* src/xterm.c (x_dispatch_event): Define only if
USE_X_TOOLKIT || USE_MOTIF || USE_GTK.
This commit is contained in:
Paul Eggert 2017-11-11 22:59:41 -08:00
parent 49450d0951
commit e470d16448
2 changed files with 5 additions and 1 deletions

View file

@ -571,6 +571,7 @@ XMenuActivate(
event.xbutton.window event.xbutton.window
); );
if (event_xmp != NULL) continue; if (event_xmp != NULL) continue;
FALLTHROUGH;
default: default:
/* /*
* This is a foreign event. * This is a foreign event.

View file

@ -231,7 +231,7 @@ static void x_sync_with_move (struct frame *, int, int, bool);
static int handle_one_xevent (struct x_display_info *, static int handle_one_xevent (struct x_display_info *,
const XEvent *, int *, const XEvent *, int *,
struct input_event *); struct input_event *);
#if ! (defined USE_X_TOOLKIT || defined USE_MOTIF) #if ! (defined USE_X_TOOLKIT || defined USE_MOTIF) && defined USE_GTK
static int x_dispatch_event (XEvent *, Display *); static int x_dispatch_event (XEvent *, Display *);
#endif #endif
static void x_wm_set_window_state (struct frame *, int); static void x_wm_set_window_state (struct frame *, int);
@ -9047,6 +9047,8 @@ handle_one_xevent (struct x_display_info *dpyinfo,
return count; return count;
} }
#if defined USE_X_TOOLKIT || defined USE_MOTIF || defined USE_GTK
/* Handles the XEvent EVENT on display DISPLAY. /* Handles the XEvent EVENT on display DISPLAY.
This is used for event loops outside the normal event handling, This is used for event loops outside the normal event handling,
i.e. looping while a popup menu or a dialog is posted. i.e. looping while a popup menu or a dialog is posted.
@ -9065,6 +9067,7 @@ x_dispatch_event (XEvent *event, Display *display)
return finish; return finish;
} }
#endif
/* Read events coming from the X server. /* Read events coming from the X server.
Return as soon as there are no more events to be read. Return as soon as there are no more events to be read.