mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 8.2.4289: warnings reported by MSVC
Problem: Warnings reported by MSVC. Solution: Rename variables and other fixes. (Ken Takata, closes #9689)
This commit is contained in:
@@ -1993,11 +1993,11 @@ ExpandFromContext(
|
|||||||
#ifdef BACKSLASH_IN_FILENAME
|
#ifdef BACKSLASH_IN_FILENAME
|
||||||
if (p_csl[0] != NUL && (options & WILD_IGNORE_COMPLETESLASH) == 0)
|
if (p_csl[0] != NUL && (options & WILD_IGNORE_COMPLETESLASH) == 0)
|
||||||
{
|
{
|
||||||
int i;
|
int j;
|
||||||
|
|
||||||
for (i = 0; i < *num_file; ++i)
|
for (j = 0; j < *num_file; ++j)
|
||||||
{
|
{
|
||||||
char_u *ptr = (*file)[i];
|
char_u *ptr = (*file)[j];
|
||||||
|
|
||||||
while (*ptr != NUL)
|
while (*ptr != NUL)
|
||||||
{
|
{
|
||||||
|
@@ -2554,17 +2554,17 @@ win_update(win_T *wp)
|
|||||||
// See the version that was fixed.
|
// See the version that was fixed.
|
||||||
if (use_vtp() && get_conpty_fix_type() < 1)
|
if (use_vtp() && get_conpty_fix_type() < 1)
|
||||||
{
|
{
|
||||||
int i;
|
int k;
|
||||||
|
|
||||||
for (i = 0; i < Rows; ++i)
|
for (k = 0; k < Rows; ++k)
|
||||||
if (enc_utf8)
|
if (enc_utf8)
|
||||||
if ((*mb_off2cells)(LineOffset[i] + Columns - 2,
|
if ((*mb_off2cells)(LineOffset[k] + Columns - 2,
|
||||||
LineOffset[i] + screen_Columns) > 1)
|
LineOffset[k] + screen_Columns) > 1)
|
||||||
screen_draw_rectangle(i, Columns - 2, 1, 2, FALSE);
|
screen_draw_rectangle(k, Columns - 2, 1, 2, FALSE);
|
||||||
else
|
else
|
||||||
screen_draw_rectangle(i, Columns - 1, 1, 1, FALSE);
|
screen_draw_rectangle(k, Columns - 1, 1, 1, FALSE);
|
||||||
else
|
else
|
||||||
screen_char(LineOffset[i] + Columns - 1, i, Columns - 1);
|
screen_char(LineOffset[k] + Columns - 1, k, Columns - 1);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -372,12 +372,12 @@ repeat:
|
|||||||
{
|
{
|
||||||
if (GetLongPathNameW(wfname, buf, _MAX_PATH))
|
if (GetLongPathNameW(wfname, buf, _MAX_PATH))
|
||||||
{
|
{
|
||||||
char_u *p = utf16_to_enc(buf, NULL);
|
char_u *q = utf16_to_enc(buf, NULL);
|
||||||
|
|
||||||
if (p != NULL)
|
if (q != NULL)
|
||||||
{
|
{
|
||||||
vim_free(*bufp); // free any allocated file name
|
vim_free(*bufp); // free any allocated file name
|
||||||
*bufp = *fnamep = p;
|
*bufp = *fnamep = q;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
vim_free(wfname);
|
vim_free(wfname);
|
||||||
|
@@ -1768,16 +1768,16 @@ vgetc(void)
|
|||||||
c == K_TEAROFF)
|
c == K_TEAROFF)
|
||||||
{
|
{
|
||||||
char_u name[200];
|
char_u name[200];
|
||||||
int i;
|
int j;
|
||||||
|
|
||||||
// get menu path, it ends with a <CR>
|
// get menu path, it ends with a <CR>
|
||||||
for (i = 0; (c = vgetorpeek(TRUE)) != '\r'; )
|
for (j = 0; (c = vgetorpeek(TRUE)) != '\r'; )
|
||||||
{
|
{
|
||||||
name[i] = c;
|
name[j] = c;
|
||||||
if (i < 199)
|
if (j < 199)
|
||||||
++i;
|
++j;
|
||||||
}
|
}
|
||||||
name[i] = NUL;
|
name[j] = NUL;
|
||||||
gui_make_tearoff(name);
|
gui_make_tearoff(name);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@@ -677,7 +677,7 @@ add_menu_path(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# if defined(FEAT_GUI_MSWIN) & defined(FEAT_TEAROFF)
|
# if defined(FEAT_GUI_MSWIN) && defined(FEAT_TEAROFF)
|
||||||
// When adding a new submenu, may add a tearoff item
|
// When adding a new submenu, may add a tearoff item
|
||||||
if ( addtearoff
|
if ( addtearoff
|
||||||
&& *next_name
|
&& *next_name
|
||||||
|
@@ -452,7 +452,7 @@ wait_for_single_object(
|
|||||||
HANDLE hHandle,
|
HANDLE hHandle,
|
||||||
DWORD dwMilliseconds)
|
DWORD dwMilliseconds)
|
||||||
{
|
{
|
||||||
if (read_console_input(NULL, NULL, -2, NULL))
|
if (read_console_input(NULL, NULL, (DWORD)-2, NULL))
|
||||||
return WAIT_OBJECT_0;
|
return WAIT_OBJECT_0;
|
||||||
return WaitForSingleObject(hHandle, dwMilliseconds);
|
return WaitForSingleObject(hHandle, dwMilliseconds);
|
||||||
}
|
}
|
||||||
@@ -724,7 +724,7 @@ dyn_libintl_init(void)
|
|||||||
for (i = 0; libintl_entry[i].name != NULL
|
for (i = 0; libintl_entry[i].name != NULL
|
||||||
&& libintl_entry[i].ptr != NULL; ++i)
|
&& libintl_entry[i].ptr != NULL; ++i)
|
||||||
{
|
{
|
||||||
if ((*libintl_entry[i].ptr = (FARPROC)GetProcAddress(hLibintlDLL,
|
if ((*libintl_entry[i].ptr = GetProcAddress(hLibintlDLL,
|
||||||
libintl_entry[i].name)) == NULL)
|
libintl_entry[i].name)) == NULL)
|
||||||
{
|
{
|
||||||
dyn_libintl_end();
|
dyn_libintl_end();
|
||||||
|
@@ -746,6 +746,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
4289,
|
||||||
/**/
|
/**/
|
||||||
4288,
|
4288,
|
||||||
/**/
|
/**/
|
||||||
@@ -9468,7 +9470,7 @@ list_in_columns(char_u **items, int size, int current)
|
|||||||
// The rightmost column doesn't need a separator.
|
// The rightmost column doesn't need a separator.
|
||||||
// Sacrifice it to fit in one more column if possible.
|
// Sacrifice it to fit in one more column if possible.
|
||||||
ncol = (int) (Columns + 1) / width;
|
ncol = (int) (Columns + 1) / width;
|
||||||
nrow = item_count / ncol + (item_count % ncol ? 1 : 0);
|
nrow = item_count / ncol + ((item_count % ncol) ? 1 : 0);
|
||||||
|
|
||||||
// "i" counts columns then rows. "idx" counts rows then columns.
|
// "i" counts columns then rows. "idx" counts rows then columns.
|
||||||
for (i = 0; !got_int && i < nrow * ncol; ++i)
|
for (i = 0; !got_int && i < nrow * ncol; ++i)
|
||||||
|
Reference in New Issue
Block a user