From 142a9758151e470307a80ea37b06ea34558ff5b3 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 14 Dec 2018 19:54:39 +0100 Subject: patch 8.1.0589: compilation error in gvimext.cpp Problem: Compilation error in gvimext.cpp. Solution: Return a value. Also fix using uninitialized variable. --- src/GvimExt/gvimext.cpp | 7 +++++-- src/dosinst.c | 2 +- src/version.c | 2 ++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/GvimExt/gvimext.cpp b/src/GvimExt/gvimext.cpp index 62d925b8a..30b2dddb6 100644 --- a/src/GvimExt/gvimext.cpp +++ b/src/GvimExt/gvimext.cpp @@ -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" \""); diff --git a/src/dosinst.c b/src/dosinst.c index f73576fda..9ecb0f4eb 100644 --- a/src/dosinst.c +++ b/src/dosinst.c @@ -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] != '-') diff --git a/src/version.c b/src/version.c index 3c9eb0d88..f868e6abf 100644 --- a/src/version.c +++ b/src/version.c @@ -799,6 +799,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 589, /**/ 588, /**/ -- cgit v1.2.1