summaryrefslogtreecommitdiff
path: root/src/xterm.c
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2022-11-13 15:34:16 +0800
committerPo Lu <luangruo@yahoo.com>2022-11-13 15:35:02 +0800
commit756373a772c2c096bad1b26d7e46fa6144086ce1 (patch)
tree876dc68e34770e3eeb1acd61d9037fc991507cf1 /src/xterm.c
parent695dbd3db41f6899f07b7afb48b2061b8a7cd189 (diff)
downloademacs-756373a772c2c096bad1b26d7e46fa6144086ce1.tar.gz
Fix warnings without XCB or XFixes
* src/xterm.c (x_term_init): Don't USE_SAFE_ALLOCA or call SAFE_FREE outside of where it is actually used. For some reason the compiler still emitted warnings despite the ((void) SAFE_ALLOCA (0)) statement.
Diffstat (limited to 'src/xterm.c')
-rw-r--r--src/xterm.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/xterm.c b/src/xterm.c
index e50f669e671..48ddd175681 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -29120,10 +29120,9 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
#endif
int i;
+#if defined HAVE_XFIXES && defined USE_XCB
USE_SAFE_ALLOCA;
-
- /* Avoid warnings when SAFE_ALLOCA is not actually used. */
- ((void) SAFE_ALLOCA (0));
+#endif
block_input ();
@@ -29277,7 +29276,9 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
unblock_input ();
+#if defined HAVE_XFIXES && defined USE_XCB
SAFE_FREE ();
+#endif
return 0;
}
@@ -29297,7 +29298,9 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
unblock_input ();
+#if defined HAVE_XFIXES && defined USE_XCB
SAFE_FREE ();
+#endif
return 0;
}
#endif
@@ -30182,7 +30185,9 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
unblock_input ();
+#if defined HAVE_XFIXES && defined USE_XCB
SAFE_FREE ();
+#endif
return dpyinfo;
}