[vim/vim] Fix shadow warning (PR #19120)

4 views
Skip to first unread message

John Marriott

unread,
Jan 6, 2026, 9:07:07 PM (3 days ago) Jan 6
to vim/vim, Subscribed

This PR fixes this clang 21.1.8 warning:

clang -c -I. -Iproto -DWIN32 -DWINVER=0x0A00 -D_WIN32_WINNT=0x0A00 -DFEAT_HUGE -DHAVE_PATHDEF -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO -pipe -Wall -Wshadow -O3 -fomit-frame-pointer -DFEAT_JOB_CHANNEL -DFEAT_IPV6 -DFEAT_NETBEANS_INTG -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD menu.c -o gobjx86-64/menu.o
menu.c:724:15: warning: declaration shadows a local variable [-Wshadow]
  724 |                     int     idx;
      |                             ^
menu.c:500:10: note: previous declaration is here
  500 |     int         idx;
      |                 ^
1 warning generated.

Cheers
John


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/19120

Commit Summary

  • 6e9fac0 Fix variable shadow warning

File Changes

(1 file)

Patch Links:


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19120@github.com>

John Marriott

unread,
Jan 7, 2026, 4:11:18 PM (2 days ago) Jan 7
to vim/vim, Subscribed
basilisk0315 left a comment (vim/vim#19120)

This is a little weird. I cannot reproduce the failure at my end...


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19120/c3720829719@github.com>

Christian Brabandt

unread,
Jan 7, 2026, 4:45:15 PM (2 days ago) Jan 7
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#19120)

You mean this failure in CI when using the GUI test?

	From test_cursor_func.vim:
	Found errors in Test_screenpos():
	command line..script /home/runner/work/vim/vim/src/testdir/runtest.vim[636]..function RunTheTest[63]..Test_screenpos line 35: Expected {'row': 22} but got {'row': 23} - 3 equal items omitted

I am not sure what exactly happens, but I think the testgui runner is a bit broken, it throws out those messages:

(gvim:23028): Gtk-WARNING **: 21:34:36.193: (../../../gtk/gtkcssgadget.c:689):gtk_css_gadget_get_preferred_size: runtime check failed: (*minimum <= *natural)

(gvim:23028): Gtk-WARNING **: 21:34:36.193: GtkToolbar 0x557c2f8fa5f0 reported min size 43 and natural size 7 in get_preferred_width(); natural size must be >= min size

and I think this is also cause for those screenpos failures. I just don't know how to fix it.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19120/c3720935258@github.com>

John Marriott

unread,
Jan 7, 2026, 4:56:56 PM (2 days ago) Jan 7
to vim/vim, Subscribed
basilisk0315 left a comment (vim/vim#19120)

Yes those ones.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19120/c3720972345@github.com>

Christian Brabandt

unread,
Jan 8, 2026, 3:32:10 PM (yesterday) Jan 8
to vim/vim, Subscribed

Closed #19120 via 4936e76.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19120/issue_event/21932164037@github.com>

Reply all
Reply to author
Forward
0 new messages