[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master bec8474a45 16/16: Improve GCC pacification in xterm.c
From: |
Paul Eggert |
Subject: |
master bec8474a45 16/16: Improve GCC pacification in xterm.c |
Date: |
Mon, 1 Aug 2022 04:17:29 -0400 (EDT) |
branch: master
commit bec8474a453757aed9a38f4786325b7144c246e9
Author: Paul Eggert <eggert@cs.ucla.edu>
Commit: Paul Eggert <eggert@cs.ucla.edu>
Improve GCC pacification in xterm.c
* src/xterm.c (x_dnd_free_toplevels, x_composite_image):
Use UNINIT for initialization needed only to pacify GCC.
(x_dnd_free_toplevels): Add an eassume to pacify GCC 12.1 x86-64
-Wanalyzer-null-dereference.
2022-07-31 Paul Eggert <eggert@cs.ucla.edu>
---
src/xterm.c | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/src/xterm.c b/src/xterm.c
index 986973eb78..bf6061d30e 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -2837,8 +2837,8 @@ x_dnd_free_toplevels (bool display_alive)
struct x_client_list_window *last;
struct x_client_list_window *tem = x_dnd_toplevels;
ptrdiff_t n_windows, i, buffer_size;
- Window *destroy_windows;
- unsigned long *prev_masks;
+ Window *destroy_windows UNINIT;
+ unsigned long *prev_masks UNINIT;
specpdl_ref count;
Display *dpy;
struct x_display_info *dpyinfo;
@@ -2847,10 +2847,6 @@ x_dnd_free_toplevels (bool display_alive)
/* Probably called inside an IO error handler. */
return;
- /* Pacify GCC. */
- prev_masks = NULL;
- destroy_windows = NULL;
-
if (display_alive)
{
buffer_size = 1024;
@@ -2913,6 +2909,7 @@ x_dnd_free_toplevels (bool display_alive)
if (n_windows)
{
+ eassume (dpyinfo);
x_ignore_errors_for_next_request (dpyinfo);
for (i = 0; i < n_windows; ++i)
@@ -9311,9 +9308,7 @@ x_composite_image (struct glyph_string *s, Pixmap dest,
{
Picture destination;
XRenderPictFormat *default_format;
- XRenderPictureAttributes attr;
- /* Pacify GCC. */
- memset (&attr, 0, sizeof attr);
+ XRenderPictureAttributes attr UNINIT;
default_format = FRAME_X_PICTURE_FORMAT (s->f);
destination = XRenderCreatePicture (display, dest,
- master 24e1123241 06/16: Improve time-equal-p etc. performance, (continued)
- master 24e1123241 06/16: Improve time-equal-p etc. performance, Paul Eggert, 2022/08/01
- master 914cf4b91b 04/16: Make time arithmetic more like comparison, Paul Eggert, 2022/08/01
- master afa67ed6f2 08/16: Fix year-285428751 bug in hanoi-unix-64, Paul Eggert, 2022/08/01
- master 353413a76b 10/16: * lisp/vc/vc.el: Remove stray comment hyphen., Paul Eggert, 2022/08/01
- master 932c0bc1fc 01/16: Tune blv_found, Paul Eggert, 2022/08/01
- master d6c054a007 09/16: Fix "cons up a storm" issue in type-break, Paul Eggert, 2022/08/01
- master a51863f73d 12/16: Simplify a few timestamps, Paul Eggert, 2022/08/01
- master d634cb0954 11/16: Omit some (current-time) calls, Paul Eggert, 2022/08/01
- master 2cd204d8bb 13/16: Prefer ‘time-equal-p’ to ‘equal’ on timestamps, Paul Eggert, 2022/08/01
- master 72c3efd7d0 15/16: Fix time comparison in primitive-undo, Paul Eggert, 2022/08/01
- master bec8474a45 16/16: Improve GCC pacification in xterm.c,
Paul Eggert <=
- master 0a4477415c 05/16: Improve float-time etc. performance, Paul Eggert, 2022/08/01
- master 9d4633e934 02/16: (time-equal-p nil X) returns nil, Paul Eggert, 2022/08/01
- master e3b6242938 03/16: Fix get-internal-runtime precision, Paul Eggert, 2022/08/01
- master 2fd2008e67 07/16: * src/timefns.c (Ffloat_time): Fix doc string., Paul Eggert, 2022/08/01
- master 4d896c0977 14/16: Use list-form timestamps in .nnmh-articles, Paul Eggert, 2022/08/01