warning: declaration of ‘popup_dragwin’ shadows a global

6 views
Skip to first unread message

Dominique Pellé

unread,
Jun 15, 2019, 4:46:17 PM6/15/19
to vim_dev
Hi

I see this compilation warning in vim-8.1.1550.
I suppose that the variable should be renamed or
perhaps the global variable popup_dragwin was
meant to be used in jump_to_mouse():

ui.c: In function ‘jump_to_mouse’:
ui.c:2932:19: warning: declaration of ‘popup_dragwin’ shadows a global
declaration [-Wshadow]
static win_T *popup_dragwin = NULL;
^~~~~~~~~~~~~
In file included from vim.h:2141:0,
from ui.c:19:
globals.h:603:15: note: shadowed declaration is here
EXTERN win_T *popup_dragwin INIT(= NULL); // popup window being dragged
^~~~~~~~~~~~~

Regards
Dominique

Bram Moolenaar

unread,
Jun 15, 2019, 5:10:55 PM6/15/19
to vim...@googlegroups.com, Dominique Pellé
Forgot to include the changes to ui.c in that patch.
Will do that now. Perhaps a test should be added for dragging a dialog
when popup_filter_yesno() is used, that would catch this.

--
Some of the well known MS-Windows errors:
EHUH Unexpected error
EUSER User error, not our fault!
EGOD Horrible problem, god knows what has happened
EERR Errornous error: nothing wrong

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages