diff options
| author | Po Lu | 2022-08-15 08:54:23 +0800 |
|---|---|---|
| committer | Po Lu | 2022-08-15 08:55:26 +0800 |
| commit | 4bee89b73fb105ae28d72abbf4dbdedb4b77e11f (patch) | |
| tree | fd6a7da1bf1a5d9c0ddf735f5b633ce86725b167 /src | |
| parent | 0a8e88fd83db5398d36064a7f87cff5b57da7284 (diff) | |
| download | emacs-4bee89b73fb105ae28d72abbf4dbdedb4b77e11f.tar.gz emacs-4bee89b73fb105ae28d72abbf4dbdedb4b77e11f.zip | |
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)
Diffstat (limited to 'src')
| -rw-r--r-- | src/xterm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/xterm.c b/src/xterm.c index 5047f3066be..7b316ca9ddd 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -2109,7 +2109,7 @@ xm_setup_dnd_targets (struct x_display_info *dpyinfo, | |||
| 2109 | int rc, actual_format, idx; | 2109 | int rc, actual_format, idx; |
| 2110 | bool had_errors; | 2110 | bool had_errors; |
| 2111 | xm_targets_table_header header; | 2111 | xm_targets_table_header header; |
| 2112 | xm_targets_table_rec **recs; | 2112 | xm_targets_table_rec **recs UNINIT; |
| 2113 | xm_byte_order byteorder; | 2113 | xm_byte_order byteorder; |
| 2114 | uint8_t *data; | 2114 | uint8_t *data; |
| 2115 | ptrdiff_t total_bytes, total_items, i; | 2115 | ptrdiff_t total_bytes, total_items, i; |
| @@ -2850,7 +2850,7 @@ x_dnd_free_toplevels (bool display_alive) | |||
| 2850 | Window *destroy_windows UNINIT; | 2850 | Window *destroy_windows UNINIT; |
| 2851 | unsigned long *prev_masks UNINIT; | 2851 | unsigned long *prev_masks UNINIT; |
| 2852 | specpdl_ref count; | 2852 | specpdl_ref count; |
| 2853 | Display *dpy; | 2853 | Display *dpy UNINIT; |
| 2854 | struct x_display_info *dpyinfo; | 2854 | struct x_display_info *dpyinfo; |
| 2855 | 2855 | ||
| 2856 | if (!x_dnd_toplevels) | 2856 | if (!x_dnd_toplevels) |