From: Lars Ingebrigtsen Date: Sun, 7 Aug 2022 15:22:46 +0000 (+0200) Subject: Pacify a gcc warning in xi_handle_focus_change X-Git-Tag: emacs-29.0.90~1447^2~333 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=af90a31629be00d159f06c1dee0a96c69cf775ce;p=emacs.git Pacify a gcc warning in xi_handle_focus_change * 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; | ~~~~~~^~~~~~ --- 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