0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.1.0589: compilation error in gvimext.cpp

Problem:    Compilation error in gvimext.cpp.
Solution:   Return a value.  Also fix using uninitialized variable.
This commit is contained in:
Bram Moolenaar
2018-12-14 19:54:39 +01:00
parent 06b056e110
commit 142a975815
3 changed files with 8 additions and 3 deletions

View File

@@ -1025,7 +1025,7 @@ STDMETHODIMP CShellExt::InvokeSingleGvim(HWND hParent,
cmdlen = BUFSIZE;
cmdStrW = (wchar_t *) malloc(cmdlen * sizeof(wchar_t));
if (cmdStrW == NULL)
return;
return E_FAIL;
getGvimInvocationW(cmdStrW);
if (useDiff)
@@ -1043,7 +1043,10 @@ STDMETHODIMP CShellExt::InvokeSingleGvim(HWND hParent,
cmdlen = len + BUFSIZE;
wchar_t *cmdStrW_new = (wchar_t *)realloc(cmdStrW, cmdlen * sizeof(wchar_t));
if (cmdStrW_new == NULL)
goto theend;
{
free(cmdStrW);
return E_FAIL;
}
cmdStrW = cmdStrW_new;
}
wcscat(cmdStrW, L" \"");

View File

@@ -2459,7 +2459,7 @@ command_line_setup_choices(int argc, char **argv)
}
else if (strcmp(argv[i], "-create-directories") == 0)
{
int vimfiles_dir_choice;
int vimfiles_dir_choice = (int)vimfiles_dir_none;
init_directories_choice();
if (argv[i + 1][0] != '-')

View File

@@ -799,6 +799,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
589,
/**/
588,
/**/