From: Eli Zaretskii Date: Wed, 19 Jun 2024 11:30:17 +0000 (+0300) Subject: Avoid compilation warnings X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=30fddcad8c024150c235b322cecdd40c6eb84e59;p=emacs.git Avoid compilation warnings * src/xwidget.c (Fxwidget_perform_lispy_event): Avoid compiler warnings. (Bug#71638) (cherry picked from commit c75aa8e0f626d8e3917ef98c9ecf2b928b7a76d2) --- diff --git a/src/xwidget.c b/src/xwidget.c index 04ebcbfe96c..5093e0c1e00 100644 --- a/src/xwidget.c +++ b/src/xwidget.c @@ -489,10 +489,7 @@ On X11, modifier keys will not be processed if FRAME is nil and the selected frame is not an X-Windows frame. */) (Lisp_Object xwidget, Lisp_Object event, Lisp_Object frame) { - struct xwidget *xw; struct frame *f = NULL; - int character = -1, keycode = -1; - int modifiers = 0; #ifdef USE_GTK GdkEvent *xg_event; @@ -506,7 +503,6 @@ selected frame is not an X-Windows frame. */) #endif CHECK_LIVE_XWIDGET (xwidget); - xw = XXWIDGET (xwidget); if (!NILP (frame)) f = decode_window_system_frame (frame); @@ -514,6 +510,10 @@ selected frame is not an X-Windows frame. */) f = SELECTED_FRAME (); #ifdef USE_GTK + int character = -1, keycode = -1; + int modifiers = 0; + struct xwidget *xw = XXWIDGET (xwidget); + #ifdef HAVE_XINPUT2 /* XI2 GDK devices crash if we try this without an embedder set. */ if (!f)