emacs-diffs
[Top][All Lists]
Advanced

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

master 4bee89b73f: Fix uninitialized variable false-positives


From: Po Lu
Subject: master 4bee89b73f: Fix uninitialized variable false-positives
Date: Sun, 14 Aug 2022 20:55:36 -0400 (EDT)

branch: master
commit 4bee89b73fb105ae28d72abbf4dbdedb4b77e11f
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Fix uninitialized variable false-positives
    
    * src/xterm.c (xm_setup_dnd_targets):
    (x_dnd_free_toplevels): Mark dpy and recs UNINIT, since GCC
    thinks they can be used uninitialized.  (bug#57208)
---
 src/xterm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/xterm.c b/src/xterm.c
index 5047f3066b..7b316ca9dd 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 UNINIT;
   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 UNINIT;
   struct x_display_info *dpyinfo;
 
   if (!x_dnd_toplevels)



reply via email to

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