summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2022-10-19 21:19:08 +0800
committerPo Lu <luangruo@yahoo.com>2022-10-19 21:33:05 +0800
commitccd0ad72f2fb2ccb96f826ecbefe495cb2bffc98 (patch)
treed6982f105e8c35916fab41be036fc2fc10b56a6e /src
parent084ac1e5147558b448af41fbfebc0a99a578819c (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 3075b5af230..04247bc302d 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;
}