From: Paul Eggert Date: Wed, 6 Apr 2022 00:20:34 +0000 (-0700) Subject: Pacify gcc -Wanalyzer-null-dereference X-Git-Tag: emacs-29.0.90~1931^2~755 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=743a95f8139fb30705352d721f17ff3217e460b6;p=emacs.git Pacify gcc -Wanalyzer-null-dereference * src/xterm.c (handle_one_xevent): Don’t dereference HOLD_QUIT if it’s null. Potential problem found with gcc 11.2.1 20220127 (Red Hat 11.2.1-9), when configured with --enable-gcc-warnings. --- diff --git a/src/xterm.c b/src/xterm.c index b9a5355b415..42ab90df751 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -13826,7 +13826,8 @@ handle_one_xevent (struct x_display_info *dpyinfo, if (x_dnd_in_progress || x_dnd_waiting_for_finish) { - *hold_quit = inev.ie; + if (hold_quit) + *hold_quit = inev.ie; EVENT_INIT (inev.ie); }