]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix build warning without XKB, Xmb, and XInput 2
authorPo Lu <luangruo@yahoo.com>
Wed, 19 Oct 2022 13:19:08 +0000 (21:19 +0800)
committerPo Lu <luangruo@yahoo.com>
Wed, 19 Oct 2022 13:33:05 +0000 (21:33 +0800)
* src/xterm.c (handle_one_xevent): Avoid defining
USE_SAFE_ALLOCA when SAFE_ALLOCA is not actually used.

src/xterm.c

index 3075b5af2302dc795d6c37c5ac69a72c90be6fa7..04247bc302d39bba24fcbe54c2291c4a1258ad05 100644 (file)
@@ -17940,7 +17940,11 @@ handle_one_xevent (struct x_display_info *dpyinfo,
   GdkDisplay *gdpy = gdk_x11_lookup_xdisplay (dpyinfo->display);
 #endif
   int dx, dy;
+
+  /* Avoid warnings when SAFE_ALLOCA is not actually used.  */
+#if defined HAVE_XINPUT2 || defined HAVE_XKB || defined HAVE_X_I18N
   USE_SAFE_ALLOCA;
+#endif
 
   /* This function is not reentrant, so input should be blocked before
      it is called.  */
@@ -24220,7 +24224,10 @@ handle_one_xevent (struct x_display_info *dpyinfo,
       count++;
     }
 
+#if defined HAVE_XINPUT2 || defined HAVE_XKB || defined HAVE_X_I18N
   SAFE_FREE ();
+#endif
+
   return count;
 }