[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master ccd0ad72f2 1/2: Fix build warning without XKB, Xmb, and XInput 2
From: |
Po Lu |
Subject: |
master ccd0ad72f2 1/2: Fix build warning without XKB, Xmb, and XInput 2 |
Date: |
Wed, 19 Oct 2022 09:33:31 -0400 (EDT) |
branch: master
commit ccd0ad72f2fb2ccb96f826ecbefe495cb2bffc98
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Fix build warning without XKB, Xmb, and XInput 2
* src/xterm.c (handle_one_xevent): Avoid defining
USE_SAFE_ALLOCA when SAFE_ALLOCA is not actually used.
---
src/xterm.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/xterm.c b/src/xterm.c
index 3075b5af23..04247bc302 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -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;
}