[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master a55a0483c9 11/11: Pacify GCC 12 in x_get_current_wm_state
From: |
Paul Eggert |
Subject: |
master a55a0483c9 11/11: Pacify GCC 12 in x_get_current_wm_state |
Date: |
Tue, 31 May 2022 04:27:01 -0400 (EDT) |
branch: master
commit a55a0483c939b7e0cc8b85d96a2fe8ac3fc6fb41
Author: Paul Eggert <eggert@cs.ucla.edu>
Commit: Paul Eggert <eggert@cs.ucla.edu>
Pacify GCC 12 in x_get_current_wm_state
* src/xterm.c (x_get_current_wm_state): When lint checking,
initialize reply_data to a non-null dummy value instead of to a
null one. This pacifies GCC 12 -Wanalyzer-null-dereference.
---
src/xterm.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/xterm.c b/src/xterm.c
index e9c38ae484..0ebabdccaf 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -22468,15 +22468,20 @@ x_get_current_wm_state (struct frame *f,
#ifdef USE_XCB
xcb_get_property_cookie_t prop_cookie;
xcb_get_property_reply_t *prop;
- xcb_atom_t *reply_data UNINIT;
+ typedef xcb_atom_t reply_data_object;
#else
Display *dpy = FRAME_X_DISPLAY (f);
unsigned long bytes_remaining;
int rc, actual_format;
Atom actual_type;
unsigned char *tmp_data = NULL;
- Atom *reply_data UNINIT;
+ typedef Atom reply_data_object;
#endif
+ reply_data_object *reply_data;
+# if defined GCC_LINT || defined lint
+ reply_data_object reply_data_dummy;
+ reply_data = &reply_data_dummy;
+# endif
*sticky = false;
*size_state = FULLSCREEN_NONE;
- master updated (d94890404e -> a55a0483c9), Paul Eggert, 2022/05/31
- master 1f6973241a 07/11: Pacify GCC 12 in Fx_show_tip, Paul Eggert, 2022/05/31
- master a1c19dfca4 01/11: Pacify GCC 12 -Wanalyzer-use-of-uninitialized-value, Paul Eggert, 2022/05/31
- master c4da5db04b 08/11: Pacify GCC 12 in Fmove_overlay, Paul Eggert, 2022/05/31
- master 82c05c034e 03/11: Avoid undefined behavior in detect_coding routines, Paul Eggert, 2022/05/31
- master 877be9098e 02/11: Pacify GCC 12 -fanalyzer in x_popup_menu_1, Paul Eggert, 2022/05/31
- master 0614e0f3e9 10/11: Pacify GCC 12 in dump_queue_enqueue, Paul Eggert, 2022/05/31
- master 13dac6f3e9 05/11: Pacify GCC 12 false positive in ccl.c, Paul Eggert, 2022/05/31
- master 569d4c7ad6 09/11: Be more robust if doc file is corrupted, Paul Eggert, 2022/05/31
- master a55a0483c9 11/11: Pacify GCC 12 in x_get_current_wm_state,
Paul Eggert <=
- master 30966a6e67 04/11: Simplify CHAR_TABLE_REF_ASCII, Paul Eggert, 2022/05/31
- master 920f1e68b8 06/11: Pacify GCC 12 in xrdb.c, Paul Eggert, 2022/05/31