From af90a31629be00d159f06c1dee0a96c69cf775ce Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Sun, 7 Aug 2022 17:22:46 +0200 Subject: [PATCH] Pacify a gcc warning in xi_handle_focus_change MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * src/xterm.c (xi_handle_focus_change): Pacify a wrong warning on gcc (Debian 10.2.1-6). xterm.c: In function ‘xi_handle_focus_change’: xterm.c:12564:25: warning: ‘source’ may be used uninitialized in this function [-Wmaybe-uninitialized] 12564 | ie.device = source->name; | ~~~~~~^~~~~~ --- src/xterm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xterm.c b/src/xterm.c index 97985c8d9e7..54bf6566572 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -12481,7 +12481,7 @@ xi_handle_focus_change (struct x_display_info *dpyinfo) { struct input_event ie; struct frame *focus, *new; - struct xi_device_t *device, *source; + struct xi_device_t *device, *source = NULL; ptrdiff_t i; Time time; #ifdef USE_GTK -- 2.39.2