patch 9.1.2067: shadow variable warning in menu.c
Commit:
https://github.com/vim/vim/commit/4936e761a5da13fdb6fcc0bb1af075d6c473d6ae
Author: John Marriott <[email protected]>
Date: Thu Jan 8 20:29:54 2026 +0000
patch 9.1.2067: shadow variable warning in menu.c
Problem: shadow variable warning in menu.c
Solution: Rename the variable (John Marriott).
closes: #19120
Signed-off-by: John Marriott <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/src/menu.c b/src/menu.c
index fc14e1b72..8b9b3af74 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -721,19 +721,19 @@ add_menu_path(
if (tearpath != NULL)
{
char_u *s;
- int idx;
+ int len;
STRCPY(tearpath, menu_path);
- idx = (int)(next_name - path_name - 1);
- for (s = tearpath; *s && s < tearpath + idx; MB_PTR_ADV(s))
+ len = (int)(next_name - path_name - 1);
+ for (s = tearpath; *s && s < tearpath + len; MB_PTR_ADV(s))
{
if ((*s == '\' || *s == Ctrl_V) && s[1])
{
- ++idx;
+ ++len;
++s;
}
}
- tearpath[idx] = NUL;
+ tearpath[len] = NUL;
gui_add_tearoff(tearpath, pri_tab, pri_idx);
vim_free(tearpath);
}
diff --git a/src/version.c b/src/version.c
index 1f83c825f..003b58ab0 100644
--- a/src/version.c
+++ b/src/version.c
@@ -734,6 +734,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 2067,
/**/
2066,
/**/
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/vim_dev/E1vdwsR-003CTI-BE%40256bit.org.