aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGlenn Morris2021-10-04 08:13:11 -0700
committerGlenn Morris2021-10-04 08:13:11 -0700
commite0fdb68f8ccb1c870bfb8c3cd2bf786a0bb312b6 (patch)
treec196f5f691ae5ad5d732f49af358768eaf9141ef /src
parentf0e6b47ef0a5ee15568e0b3992352d00d1055f46 (diff)
parent3b8dda6c903e8e103a26ce812fc9400b301a09ae (diff)
downloademacs-e0fdb68f8ccb1c870bfb8c3cd2bf786a0bb312b6.tar.gz
emacs-e0fdb68f8ccb1c870bfb8c3cd2bf786a0bb312b6.zip
Merge from origin/emacs-28
3b8dda6c90 Add safety check in x_menu_show e1fb731393 Tweak x_connection_closed when I/O error 595e506c82 * lisp/erc/erc.el (erc-user-mode): Set "+i" by default. d00f3d4c05 Port unused decls to C2x 317eb2d5b5 Improve structure of TODO c0793cd9de Don't use some obsolete names in documentation 87153cc915 Tweak x_hide_tip for consistency 7e871dcd27 Remove encode_terminal_code UNINITs 2a00634880 Port pdumper.c maybe_unused to C2x 6d9b3c0eaa Port systhreads.h to C2x fd274d7d24 Pacify -Wanalyzer-null-argument in lisp_malloc cc3fc94f09 Pacify gcc 11.2.1 -Wanalyzer-null-argument d3a832a61a Simplify hack-read-symbol-shorthands again (bug#50946) 4831426158 Fix recipe for 'native-lisp' directory 0bb42ef803 ; * lisp/time-stamp.el (time-stamp-format): Doc string. 732c70a0d9 Simplify socket symlink-attack checking fc32a3bd95 ; * doc/lispref/files.texi (Reading from Files): Fix wording. 3cc77aa976 Clarify (elisp) insert-file-contents with BEG or END not o... 5deeb0947d * src/Makefile.in: Simplify conditionals. 121a5abeae Move context-menu selection items Defun/List/Symbol to pro... 0c341e6e84 * lisp/tab-bar.el (tab-bar-detach-tab): Handle frame selec... 931a7276c0 * lisp/tab-line.el (tab-line-format): Add face-modified to... 3863919a00 Fix unmounting in Tramp 7a6d34cd1f * etc/themes/light-blue-theme.el: Add "Maintainer: emacs-d... c1b1e1f545 Define HAVE_NATIVE_COMP in src/Makefile.in 137fa2d716 Rename elisp-shorthands to read-symbol-shorthands e6fbc45b7b Font-lock shorthands in elisp-mode for quick visual recogn... 17e6f3bee5 ; Fix last change in tramp-sshfs.el 3dae1e33d1 Suppress superfluous error messages in Tramp b228ec9fab Fix reading the tail of a file in shorthands.el 7fb2789509 Fix substitution of pretty quotes in code in easy-mmode b47d7ce1b8 Fix agent directory deletion b1a8a66fb0 ; * etc/TODO: Fix previous commit; delete the right thing. 6c01a21365 Clarify the purpose of internal--format-docstring-line 55dadbc57e * lisp/net/dictionary.el (context-menu-dictionary): Move m... bb209cd5ab Update to Org 9.5-30-g10dc9d 4341e79a5f Remove bogus ":safe t" custom properties b6f6b593c6 Fix 'apropos-compact-layout' 62d6cecfcd Remove bogus ":safe nil" custom properties f9111d8784 The safe-local-variable property is a function (bug#50944) 3dc094abee ; Some minor tweaks to TODO a5b4356d37 Revert "; * etc/TODO: Move elpa.gnu.org items to the end." 7bc0cee115 Revert "* etc/TODO: Rearrange to start with "Simple tasks"." 3489471417 Fix selection of fonts for Arabic on Posix platforms 13e5943386 ; Fix a typo in a doc string bd60fca2fa Fix ox-koma-letter compilation warnings 340e527bed Preload paren.el a9052248da Improve documentation of 'shift-select-mode' d505971894 ; Standardize some license headers 9307889d68 Simplify shorthand injection (bug#50946) 5c77cc9584 ; * admin/release-branch.txt: Tweak previous. # Conflicts: # etc/NEWS # test/lisp/subr-tests.el
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.in25
-rw-r--r--src/alloc.c5
-rw-r--r--src/conf_post.h1
-rw-r--r--src/gtkutil.c5
-rw-r--r--src/lread.c26
-rw-r--r--src/pdumper.c20
-rw-r--r--src/process.c2
-rw-r--r--src/systhread.h13
-rw-r--r--src/term.c7
-rw-r--r--src/unexcw.c6
-rw-r--r--src/xfns.c16
-rw-r--r--src/xmenu.c8
-rw-r--r--src/xterm.c5
13 files changed, 63 insertions, 76 deletions
diff --git a/src/Makefile.in b/src/Makefile.in
index 34335cfa96d..25c7865d4a1 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -55,6 +55,8 @@ lwlibdir = ../lwlib
55# Configuration files for .o files to depend on. 55# Configuration files for .o files to depend on.
56config_h = config.h $(srcdir)/conf_post.h 56config_h = config.h $(srcdir)/conf_post.h
57 57
58HAVE_NATIVE_COMP = @HAVE_NATIVE_COMP@
59
58## ns-app if NS self contained app, else empty. 60## ns-app if NS self contained app, else empty.
59OTHER_FILES = @OTHER_FILES@ 61OTHER_FILES = @OTHER_FILES@
60 62
@@ -448,14 +450,9 @@ FIRSTFILE_OBJ=@FIRSTFILE_OBJ@
448ALLOBJS = $(FIRSTFILE_OBJ) $(VMLIMIT_OBJ) $(obj) $(otherobj) 450ALLOBJS = $(FIRSTFILE_OBJ) $(VMLIMIT_OBJ) $(obj) $(otherobj)
449 451
450# Must be first, before dep inclusion! 452# Must be first, before dep inclusion!
451ifeq ($(HAVE_NATIVE_COMP),yes)
452ifeq ($(NATIVE_DISABLED),)
453all: emacs$(EXEEXT) $(pdmp) $(OTHER_FILES) ../native-lisp
454else
455all: emacs$(EXEEXT) $(pdmp) $(OTHER_FILES)
456endif
457else
458all: emacs$(EXEEXT) $(pdmp) $(OTHER_FILES) 453all: emacs$(EXEEXT) $(pdmp) $(OTHER_FILES)
454ifeq ($(HAVE_NATIVE_COMP):$(NATIVE_DISABLED),yes:)
455all: ../native-lisp
459endif 456endif
460.PHONY: all 457.PHONY: all
461 458
@@ -783,8 +780,7 @@ tags: TAGS ../lisp/TAGS $(lwlibdir)/TAGS
783 @$(MAKE) $(AM_V_NO_PD) -C ../lisp EMACS="$(bootstrap_exe)"\ 780 @$(MAKE) $(AM_V_NO_PD) -C ../lisp EMACS="$(bootstrap_exe)"\
784 THEFILE=$< $<c 781 THEFILE=$< $<c
785 782
786ifeq ($(HAVE_NATIVE_COMP),yes) 783ifeq ($(HAVE_NATIVE_COMP):$(NATIVE_DISABLED),yes:)
787ifeq ($(NATIVE_DISABLED),)
788## The following rules are used only when building a source tarball 784## The following rules are used only when building a source tarball
789## for the first time, when the native-lisp/ directory doesn't yet 785## for the first time, when the native-lisp/ directory doesn't yet
790## exist and needs to be created and populated with the preloaded 786## exist and needs to be created and populated with the preloaded
@@ -808,11 +804,12 @@ elnlisp := $(addprefix ${lispsource}/,${elnlisp}) $(lisp:.elc=.eln)
808 THEFILE=$< $<n 804 THEFILE=$< $<n
809 805
810../native-lisp: | $(pdmp) 806../native-lisp: | $(pdmp)
811 mkdir $@ && $(MAKE) $(AM_V_NO_PD) $(elnlisp) 807 if test ! -d $@; then \
812 LC_ALL=C $(RUN_TEMACS) -batch $(BUILD_DETAILS) -l loadup --temacs=pdump \ 808 mkdir $@ && $(MAKE) $(AM_V_NO_PD) $(elnlisp); \
813 --bin-dest $(BIN_DESTDIR) --eln-dest $(ELN_DESTDIR) 809 LC_ALL=C $(RUN_TEMACS) -batch $(BUILD_DETAILS) -l loadup --temacs=pdump \
814 cp -f $@ $(bootstrap_pdmp) 810 --bin-dest $(BIN_DESTDIR) --eln-dest $(ELN_DESTDIR); \
815endif 811 cp -f $@ $(bootstrap_pdmp); \
812 fi
816endif 813endif
817 814
818## VCSWITNESS points to the file that holds info about the current checkout. 815## VCSWITNESS points to the file that holds info about the current checkout.
diff --git a/src/alloc.c b/src/alloc.c
index 0895a0f52aa..0c04d5cde05 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -988,7 +988,8 @@ record_xmalloc (size_t size)
988 988
989/* Like malloc but used for allocating Lisp data. NBYTES is the 989/* Like malloc but used for allocating Lisp data. NBYTES is the
990 number of bytes to allocate, TYPE describes the intended use of the 990 number of bytes to allocate, TYPE describes the intended use of the
991 allocated memory block (for strings, for conses, ...). */ 991 allocated memory block (for strings, for conses, ...).
992 NBYTES must be positive. */
992 993
993#if ! USE_LSB_TAG 994#if ! USE_LSB_TAG
994void *lisp_malloc_loser EXTERNALLY_VISIBLE; 995void *lisp_malloc_loser EXTERNALLY_VISIBLE;
@@ -1030,7 +1031,7 @@ lisp_malloc (size_t nbytes, bool clearit, enum mem_type type)
1030#endif 1031#endif
1031 1032
1032 MALLOC_UNBLOCK_INPUT; 1033 MALLOC_UNBLOCK_INPUT;
1033 if (!val && nbytes) 1034 if (!val)
1034 memory_full (nbytes); 1035 memory_full (nbytes);
1035 MALLOC_PROBE (nbytes); 1036 MALLOC_PROBE (nbytes);
1036 return val; 1037 return val;
diff --git a/src/conf_post.h b/src/conf_post.h
index 8558dc466cc..2c6fbb0dba5 100644
--- a/src/conf_post.h
+++ b/src/conf_post.h
@@ -293,7 +293,6 @@ extern int emacs_setenv_TZ (char const *);
293 ATTRIBUTE_FORMAT ((PRINTF_ARCHETYPE, string_index, first_to_check)) 293 ATTRIBUTE_FORMAT ((PRINTF_ARCHETYPE, string_index, first_to_check))
294 294
295#define ARG_NONNULL ATTRIBUTE_NONNULL 295#define ARG_NONNULL ATTRIBUTE_NONNULL
296#define ATTRIBUTE_UNUSED MAYBE_UNUSED
297 296
298/* Declare NAME to be a pointer to an object of type TYPE, initialized 297/* Declare NAME to be a pointer to an object of type TYPE, initialized
299 to the address ADDR, which may be of a different type. Accesses 298 to the address ADDR, which may be of a different type. Accesses
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 313cfc82c26..e87845caf70 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -2932,8 +2932,9 @@ xg_item_label_same_p (GtkMenuItem *witem, const char *label)
2932 char *utf8_label = get_utf8_string (label); 2932 char *utf8_label = get_utf8_string (label);
2933 const char *old_label = witem ? xg_get_menu_item_label (witem) : 0; 2933 const char *old_label = witem ? xg_get_menu_item_label (witem) : 0;
2934 2934
2935 bool is_same = (!old_label == !utf8_label 2935 bool is_same = (old_label
2936 && (!old_label || strcmp (utf8_label, old_label) == 0)); 2936 ? utf8_label && strcmp (utf8_label, old_label) == 0
2937 : !utf8_label);
2937 2938
2938 if (utf8_label) g_free (utf8_label); 2939 if (utf8_label) g_free (utf8_label);
2939 2940
diff --git a/src/lread.c b/src/lread.c
index af0a7994592..07580d11d13 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -4626,29 +4626,29 @@ oblookup (Lisp_Object obarray, register const char *ptr, ptrdiff_t size, ptrdiff
4626 return tem; 4626 return tem;
4627} 4627}
4628 4628
4629/* Like 'oblookup', but considers 'Velisp_shorthands', potentially 4629/* Like 'oblookup', but considers 'Vread_symbol_shorthands',
4630 recognizing that IN is shorthand for some other longhand name, 4630 potentially recognizing that IN is shorthand for some other
4631 which is then then placed in OUT. In that case, memory is 4631 longhand name, which is then then placed in OUT. In that case,
4632 malloc'ed for OUT (which the caller must free) while SIZE_OUT and 4632 memory is malloc'ed for OUT (which the caller must free) while
4633 SIZE_BYTE_OUT respectively hold the character and byte sizes of the 4633 SIZE_OUT and SIZE_BYTE_OUT respectively hold the character and byte
4634 transformed symbol name. If IN is not recognized shorthand for any 4634 sizes of the transformed symbol name. If IN is not recognized
4635 other symbol, OUT is set to point to NULL and 'oblookup' is 4635 shorthand for any other symbol, OUT is set to point to NULL and
4636 called. */ 4636 'oblookup' is called. */
4637 4637
4638Lisp_Object 4638Lisp_Object
4639oblookup_considering_shorthand (Lisp_Object obarray, const char *in, 4639oblookup_considering_shorthand (Lisp_Object obarray, const char *in,
4640 ptrdiff_t size, ptrdiff_t size_byte, char **out, 4640 ptrdiff_t size, ptrdiff_t size_byte, char **out,
4641 ptrdiff_t *size_out, ptrdiff_t *size_byte_out) 4641 ptrdiff_t *size_out, ptrdiff_t *size_byte_out)
4642{ 4642{
4643 Lisp_Object tail = Velisp_shorthands; 4643 Lisp_Object tail = Vread_symbol_shorthands;
4644 4644
4645 /* First, assume no transformation will take place. */ 4645 /* First, assume no transformation will take place. */
4646 *out = NULL; 4646 *out = NULL;
4647 /* Then, iterate each pair in Velisp_shorthands. */ 4647 /* Then, iterate each pair in Vread_symbol_shorthands. */
4648 FOR_EACH_TAIL_SAFE (tail) 4648 FOR_EACH_TAIL_SAFE (tail)
4649 { 4649 {
4650 Lisp_Object pair = XCAR (tail); 4650 Lisp_Object pair = XCAR (tail);
4651 /* Be lenient to 'elisp-shorthands': if some element isn't a 4651 /* Be lenient to 'read-symbol-shorthands': if some element isn't a
4652 cons, or some member of that cons isn't a string, just skip 4652 cons, or some member of that cons isn't a string, just skip
4653 to the next element. */ 4653 to the next element. */
4654 if (!CONSP (pair)) 4654 if (!CONSP (pair))
@@ -5446,10 +5446,10 @@ that are loaded before your customizations are read! */);
5446 5446
5447 DEFSYM (Qchar_from_name, "char-from-name"); 5447 DEFSYM (Qchar_from_name, "char-from-name");
5448 5448
5449 DEFVAR_LISP ("elisp-shorthands", Velisp_shorthands, 5449 DEFVAR_LISP ("read-symbol-shorthands", Vread_symbol_shorthands,
5450 doc: /* Alist of known symbol-name shorthands. 5450 doc: /* Alist of known symbol-name shorthands.
5451This variable's value can only be set via file-local variables. 5451This variable's value can only be set via file-local variables.
5452See Info node `(elisp)Shorthands' for more details. */); 5452See Info node `(elisp)Shorthands' for more details. */);
5453 Velisp_shorthands = Qnil; 5453 Vread_symbol_shorthands = Qnil;
5454 DEFSYM (Qobarray_cache, "obarray-cache"); 5454 DEFSYM (Qobarray_cache, "obarray-cache");
5455} 5455}
diff --git a/src/pdumper.c b/src/pdumper.c
index 2291fced5d7..11c680d77b7 100644
--- a/src/pdumper.c
+++ b/src/pdumper.c
@@ -799,7 +799,7 @@ dump_tailq_length (const struct dump_tailq *tailq)
799 return tailq->length; 799 return tailq->length;
800} 800}
801 801
802static void ATTRIBUTE_UNUSED 802static void
803dump_tailq_prepend (struct dump_tailq *tailq, Lisp_Object value) 803dump_tailq_prepend (struct dump_tailq *tailq, Lisp_Object value)
804{ 804{
805 Lisp_Object link = Fcons (value, tailq->head); 805 Lisp_Object link = Fcons (value, tailq->head);
@@ -809,24 +809,6 @@ dump_tailq_prepend (struct dump_tailq *tailq, Lisp_Object value)
809 tailq->length += 1; 809 tailq->length += 1;
810} 810}
811 811
812static void ATTRIBUTE_UNUSED
813dump_tailq_append (struct dump_tailq *tailq, Lisp_Object value)
814{
815 Lisp_Object link = Fcons (value, Qnil);
816 if (NILP (tailq->head))
817 {
818 eassert (NILP (tailq->tail));
819 tailq->head = tailq->tail = link;
820 }
821 else
822 {
823 eassert (!NILP (tailq->tail));
824 XSETCDR (tailq->tail, link);
825 tailq->tail = link;
826 }
827 tailq->length += 1;
828}
829
830static bool 812static bool
831dump_tailq_empty_p (struct dump_tailq *tailq) 813dump_tailq_empty_p (struct dump_tailq *tailq)
832{ 814{
diff --git a/src/process.c b/src/process.c
index 58347a154a3..221d4c7f6c3 100644
--- a/src/process.c
+++ b/src/process.c
@@ -4004,7 +4004,7 @@ usage: (make-network-process &rest ARGS) */)
4004 4004
4005 if (!NILP (host)) 4005 if (!NILP (host))
4006 { 4006 {
4007 ptrdiff_t portstringlen ATTRIBUTE_UNUSED; 4007 MAYBE_UNUSED ptrdiff_t portstringlen;
4008 4008
4009 /* SERVICE can either be a string or int. 4009 /* SERVICE can either be a string or int.
4010 Convert to a C string for later use by getaddrinfo. */ 4010 Convert to a C string for later use by getaddrinfo. */
diff --git a/src/systhread.h b/src/systhread.h
index 0f47d7c1a8a..601505f4f86 100644
--- a/src/systhread.h
+++ b/src/systhread.h
@@ -101,14 +101,11 @@ extern void sys_cond_signal (sys_cond_t *);
101extern void sys_cond_broadcast (sys_cond_t *); 101extern void sys_cond_broadcast (sys_cond_t *);
102extern void sys_cond_destroy (sys_cond_t *); 102extern void sys_cond_destroy (sys_cond_t *);
103 103
104extern sys_thread_t sys_thread_self (void) 104NODISCARD extern sys_thread_t sys_thread_self (void);
105 NODISCARD; 105NODISCARD extern bool sys_thread_equal (sys_thread_t, sys_thread_t);
106extern bool sys_thread_equal (sys_thread_t, sys_thread_t) 106
107 NODISCARD; 107NODISCARD extern bool sys_thread_create (sys_thread_t *,
108 108 thread_creation_function *, void *);
109extern bool sys_thread_create (sys_thread_t *, thread_creation_function *,
110 void *)
111 NODISCARD;
112 109
113extern void sys_thread_yield (void); 110extern void sys_thread_yield (void);
114extern void sys_thread_set_name (const char *); 111extern void sys_thread_set_name (const char *);
diff --git a/src/term.c b/src/term.c
index 7d9fe8cee30..0858f816851 100644
--- a/src/term.c
+++ b/src/term.c
@@ -549,13 +549,14 @@ encode_terminal_code (struct glyph *src, int src_len,
549 { 549 {
550 if (src->type == COMPOSITE_GLYPH) 550 if (src->type == COMPOSITE_GLYPH)
551 { 551 {
552 struct composition *cmp UNINIT; 552 struct composition *cmp;
553 Lisp_Object gstring UNINIT; 553 Lisp_Object gstring;
554 int i; 554 int i;
555 555
556 nbytes = buf - encode_terminal_src; 556 nbytes = buf - encode_terminal_src;
557 if (src->u.cmp.automatic) 557 if (src->u.cmp.automatic)
558 { 558 {
559 cmp = NULL;
559 gstring = composition_gstring_from_id (src->u.cmp.id); 560 gstring = composition_gstring_from_id (src->u.cmp.id);
560 required = src->slice.cmp.to - src->slice.cmp.from + 1; 561 required = src->slice.cmp.to - src->slice.cmp.from + 1;
561 } 562 }
@@ -575,7 +576,7 @@ encode_terminal_code (struct glyph *src, int src_len,
575 buf = encode_terminal_src + nbytes; 576 buf = encode_terminal_src + nbytes;
576 } 577 }
577 578
578 if (src->u.cmp.automatic) 579 if (!cmp)
579 for (i = src->slice.cmp.from; i <= src->slice.cmp.to; i++) 580 for (i = src->slice.cmp.from; i <= src->slice.cmp.to; i++)
580 { 581 {
581 Lisp_Object g = LGSTRING_GLYPH (gstring, i); 582 Lisp_Object g = LGSTRING_GLYPH (gstring, i);
diff --git a/src/unexcw.c b/src/unexcw.c
index 7a80b05963b..157e9f45607 100644
--- a/src/unexcw.c
+++ b/src/unexcw.c
@@ -48,7 +48,7 @@ static exe_header_t *
48read_exe_header (int fd, exe_header_t * exe_header_buffer) 48read_exe_header (int fd, exe_header_t * exe_header_buffer)
49{ 49{
50 int i; 50 int i;
51 int ret ATTRIBUTE_UNUSED; 51 MAYBE_UNUSED int ret;
52 52
53 assert (fd >= 0); 53 assert (fd >= 0);
54 assert (exe_header_buffer != 0); 54 assert (exe_header_buffer != 0);
@@ -111,7 +111,7 @@ fixup_executable (int fd)
111 exe_header_t exe_header_buffer; 111 exe_header_t exe_header_buffer;
112 exe_header_t *exe_header; 112 exe_header_t *exe_header;
113 int i; 113 int i;
114 int ret ATTRIBUTE_UNUSED; 114 MAYBE_UNUSED int ret;
115 int found_data = 0; 115 int found_data = 0;
116 int found_bss = 0; 116 int found_bss = 0;
117 117
@@ -269,7 +269,7 @@ unexec (const char *outfile, const char *infile)
269 int fd_in; 269 int fd_in;
270 int fd_out; 270 int fd_out;
271 int ret; 271 int ret;
272 int ret2 ATTRIBUTE_UNUSED; 272 MAYBE_UNUSED int ret2;
273 273
274 infile = add_exe_suffix_if_necessary (infile, infile_buffer); 274 infile = add_exe_suffix_if_necessary (infile, infile_buffer);
275 outfile = add_exe_suffix_if_necessary (outfile, outfile_buffer); 275 outfile = add_exe_suffix_if_necessary (outfile, outfile_buffer);
diff --git a/src/xfns.c b/src/xfns.c
index 0d0335c2997..785ae3baca5 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -6222,7 +6222,7 @@ Otherwise, the return value is a vector with the following fields:
6222static void compute_tip_xy (struct frame *, Lisp_Object, Lisp_Object, 6222static void compute_tip_xy (struct frame *, Lisp_Object, Lisp_Object,
6223 Lisp_Object, int, int, int *, int *); 6223 Lisp_Object, int, int, int *, int *);
6224 6224
6225/* The frame of the currently visible tooltip. */ 6225/* The frame of the currently visible tooltip, or nil if none. */
6226static Lisp_Object tip_frame; 6226static Lisp_Object tip_frame;
6227 6227
6228/* The window-system window corresponding to the frame of the 6228/* The window-system window corresponding to the frame of the
@@ -6710,7 +6710,7 @@ x_hide_tip (bool delete)
6710 if ((NILP (tip_last_frame) && NILP (tip_frame)) 6710 if ((NILP (tip_last_frame) && NILP (tip_frame))
6711 || (!x_gtk_use_system_tooltips 6711 || (!x_gtk_use_system_tooltips
6712 && !delete 6712 && !delete
6713 && FRAMEP (tip_frame) 6713 && !NILP (tip_frame)
6714 && FRAME_LIVE_P (XFRAME (tip_frame)) 6714 && FRAME_LIVE_P (XFRAME (tip_frame))
6715 && !FRAME_VISIBLE_P (XFRAME (tip_frame)))) 6715 && !FRAME_VISIBLE_P (XFRAME (tip_frame))))
6716 /* Either there's no tooltip to hide or it's an already invisible 6716 /* Either there's no tooltip to hide or it's an already invisible
@@ -6727,7 +6727,7 @@ x_hide_tip (bool delete)
6727 specbind (Qinhibit_quit, Qt); 6727 specbind (Qinhibit_quit, Qt);
6728 6728
6729 /* Try to hide the GTK+ system tip first. */ 6729 /* Try to hide the GTK+ system tip first. */
6730 if (FRAMEP (tip_last_frame)) 6730 if (!NILP (tip_last_frame))
6731 { 6731 {
6732 struct frame *f = XFRAME (tip_last_frame); 6732 struct frame *f = XFRAME (tip_last_frame);
6733 6733
@@ -6745,7 +6745,7 @@ x_hide_tip (bool delete)
6745 tip_last_frame = Qnil; 6745 tip_last_frame = Qnil;
6746 6746
6747 /* Now look whether there's an Emacs tip around. */ 6747 /* Now look whether there's an Emacs tip around. */
6748 if (FRAMEP (tip_frame)) 6748 if (!NILP (tip_frame))
6749 { 6749 {
6750 struct frame *f = XFRAME (tip_frame); 6750 struct frame *f = XFRAME (tip_frame);
6751 6751
@@ -6775,7 +6775,7 @@ x_hide_tip (bool delete)
6775#else /* not USE_GTK */ 6775#else /* not USE_GTK */
6776 if (NILP (tip_frame) 6776 if (NILP (tip_frame)
6777 || (!delete 6777 || (!delete
6778 && FRAMEP (tip_frame) 6778 && !NILP (tip_frame)
6779 && FRAME_LIVE_P (XFRAME (tip_frame)) 6779 && FRAME_LIVE_P (XFRAME (tip_frame))
6780 && !FRAME_VISIBLE_P (XFRAME (tip_frame)))) 6780 && !FRAME_VISIBLE_P (XFRAME (tip_frame))))
6781 return Qnil; 6781 return Qnil;
@@ -6788,7 +6788,7 @@ x_hide_tip (bool delete)
6788 specbind (Qinhibit_redisplay, Qt); 6788 specbind (Qinhibit_redisplay, Qt);
6789 specbind (Qinhibit_quit, Qt); 6789 specbind (Qinhibit_quit, Qt);
6790 6790
6791 if (FRAMEP (tip_frame)) 6791 if (!NILP (tip_frame))
6792 { 6792 {
6793 struct frame *f = XFRAME (tip_frame); 6793 struct frame *f = XFRAME (tip_frame);
6794 6794
@@ -6931,7 +6931,7 @@ Text larger than the specified size is clipped. */)
6931 } 6931 }
6932#endif /* USE_GTK */ 6932#endif /* USE_GTK */
6933 6933
6934 if (FRAMEP (tip_frame) && FRAME_LIVE_P (XFRAME (tip_frame))) 6934 if (!NILP (tip_frame) && FRAME_LIVE_P (XFRAME (tip_frame)))
6935 { 6935 {
6936 if (FRAME_VISIBLE_P (XFRAME (tip_frame)) 6936 if (FRAME_VISIBLE_P (XFRAME (tip_frame))
6937 && EQ (frame, tip_last_frame) 6937 && EQ (frame, tip_last_frame)
@@ -7016,7 +7016,7 @@ Text larger than the specified size is clipped. */)
7016 tip_last_string = string; 7016 tip_last_string = string;
7017 tip_last_parms = parms; 7017 tip_last_parms = parms;
7018 7018
7019 if (!FRAMEP (tip_frame) || !FRAME_LIVE_P (XFRAME (tip_frame))) 7019 if (NILP (tip_frame) || !FRAME_LIVE_P (XFRAME (tip_frame)))
7020 { 7020 {
7021 /* Add default values to frame parameters. */ 7021 /* Add default values to frame parameters. */
7022 if (NILP (Fassq (Qname, parms))) 7022 if (NILP (Fassq (Qname, parms)))
diff --git a/src/xmenu.c b/src/xmenu.c
index a6762236bc4..709e455dd05 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -1603,6 +1603,14 @@ x_menu_show (struct frame *f, int x, int y, int menuflags,
1603 STRINGP (help) ? help : Qnil); 1603 STRINGP (help) ? help : Qnil);
1604 if (prev_wv) 1604 if (prev_wv)
1605 prev_wv->next = wv; 1605 prev_wv->next = wv;
1606 else if (!save_wv)
1607 {
1608 /* This call to 'abort' pacifies gcc 11.2.1 when Emacs
1609 is configured with --enable-gcc-warnings. FIXME: If
1610 save_wv can be null, do something better; otherwise,
1611 explain why save_wv cannot be null. */
1612 abort ();
1613 }
1606 else 1614 else
1607 save_wv->contents = wv; 1615 save_wv->contents = wv;
1608 if (!NILP (descrip)) 1616 if (!NILP (descrip))
diff --git a/src/xterm.c b/src/xterm.c
index ae3af598da6..89885e0d889 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -4049,7 +4049,7 @@ x_delete_glyphs (struct frame *f, int n)
4049/* Like XClearArea, but check that WIDTH and HEIGHT are reasonable. 4049/* Like XClearArea, but check that WIDTH and HEIGHT are reasonable.
4050 If they are <= 0, this is probably an error. */ 4050 If they are <= 0, this is probably an error. */
4051 4051
4052static ATTRIBUTE_UNUSED void 4052MAYBE_UNUSED static void
4053x_clear_area1 (Display *dpy, Window window, 4053x_clear_area1 (Display *dpy, Window window,
4054 int x, int y, int width, int height, int exposures) 4054 int x, int y, int width, int height, int exposures)
4055{ 4055{
@@ -10133,8 +10133,9 @@ x_connection_closed (Display *dpy, const char *error_message, bool ioerror)
10133 frame on it. */ 10133 frame on it. */
10134 dpyinfo->reference_count++; 10134 dpyinfo->reference_count++;
10135 dpyinfo->terminal->reference_count++; 10135 dpyinfo->terminal->reference_count++;
10136 if (ioerror)
10137 dpyinfo->display = 0;
10136 } 10138 }
10137 if (ioerror) dpyinfo->display = 0;
10138 10139
10139 /* First delete frames whose mini-buffers are on frames 10140 /* First delete frames whose mini-buffers are on frames
10140 that are on the dead display. */ 10141 that are on the dead display. */