From d14b6fa375ce7a9eded5d0aeae52c8eac893e4de Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" Date: Sun, 14 Aug 2022 18:33:45 +0300 Subject: [PATCH] Pacify maybe-uninitialized warnings in xterm.c * src/xterm.c (xm_setup_dnd_targets, x_dnd_free_toplevels): Initialize two pointers as NULL early, to pacify GCC 12 -Wmaybe-uninitialized warnings when compiling with -Og. --- src/xterm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xterm.c b/src/xterm.c index 6cf44e162b..e7ee5fd32e 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -2109,7 +2109,7 @@ xm_setup_dnd_targets (struct x_display_info *dpyinfo, int rc, actual_format, idx; bool had_errors; xm_targets_table_header header; - xm_targets_table_rec **recs; + xm_targets_table_rec **recs = NULL; xm_byte_order byteorder; uint8_t *data; ptrdiff_t total_bytes, total_items, i; @@ -2850,7 +2850,7 @@ x_dnd_free_toplevels (bool display_alive) Window *destroy_windows UNINIT; unsigned long *prev_masks UNINIT; specpdl_ref count; - Display *dpy; + Display *dpy = NULL; struct x_display_info *dpyinfo; if (!x_dnd_toplevels) -- 2.35.1