emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master af90a31629: Pacify a gcc warning in xi_handle_focus_change


From: Lars Ingebrigtsen
Subject: master af90a31629: Pacify a gcc warning in xi_handle_focus_change
Date: Sun, 7 Aug 2022 11:23:01 -0400 (EDT)

branch: master
commit af90a31629be00d159f06c1dee0a96c69cf775ce
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    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;
          |                   ~~~~~~^~~~~~
---
 src/xterm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/xterm.c b/src/xterm.c
index 97985c8d9e..54bf656657 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]