emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-26 e470d16: Pacify GCC when configured --with-x-tool


From: Paul Eggert
Subject: [Emacs-diffs] emacs-26 e470d16: Pacify GCC when configured --with-x-toolkit=no
Date: Sun, 12 Nov 2017 02:00:37 -0500 (EST)

branch: emacs-26
commit e470d16448999e79df048b92ae1db4acaafb306f
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    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.
---
 oldXMenu/Activate.c | 1 +
 src/xterm.c         | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/oldXMenu/Activate.c b/oldXMenu/Activate.c
index c27005f..638a208 100644
--- a/oldXMenu/Activate.c
+++ b/oldXMenu/Activate.c
@@ -571,6 +571,7 @@ XMenuActivate(
                                                   event.xbutton.window
                                                   );
                if (event_xmp != NULL) continue;
+               FALLTHROUGH;
            default:
                /*
                 * This is a foreign event.
diff --git a/src/xterm.c b/src/xterm.c
index e11cde7..5e2fc6d 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -231,7 +231,7 @@ static void x_sync_with_move (struct frame *, int, int, 
bool);
 static int handle_one_xevent (struct x_display_info *,
                              const XEvent *, int *,
                              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 *);
 #endif
 static void x_wm_set_window_state (struct frame *, int);
@@ -9047,6 +9047,8 @@ handle_one_xevent (struct x_display_info *dpyinfo,
   return count;
 }
 
+#if defined USE_X_TOOLKIT || defined USE_MOTIF || defined USE_GTK
+
 /* Handles the XEvent EVENT on display DISPLAY.
    This is used for event loops outside the normal event handling,
    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;
 }
+#endif
 
 /* Read events coming from the X server.
    Return as soon as there are no more events to be read.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]