]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.2067: shadow variable warning in menu.c v9.1.2067
authorJohn Marriott <basilisk@internode.on.net>
Thu, 8 Jan 2026 20:29:54 +0000 (20:29 +0000)
committerChristian Brabandt <cb@256bit.org>
Thu, 8 Jan 2026 20:29:54 +0000 (20:29 +0000)
Problem:  shadow variable warning in menu.c
Solution: Rename the variable (John Marriott).

closes: #19120

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/menu.c
src/version.c

index fc14e1b723c18bc45c5375c678829b1652fa1c3f..8b9b3af74652ac48994e79e5af9fa415501c6bdf 100644 (file)
@@ -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);
                }
index 1f83c825f08566ac76cd04e87a9902a00fa7a39d..003b58ab07048e10f4a69240517a4d1ba60d479b 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2067,
 /**/
     2066,
 /**/