summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-12-14 19:54:39 +0100
committerBram Moolenaar <Bram@vim.org>2018-12-14 19:54:39 +0100
commit142a9758151e470307a80ea37b06ea34558ff5b3 (patch)
tree5ccba6d4a0a2ff4f74bf1c20ae66c4bd0cd8d081
parent06b056e110005ce0dd97b8c6333405afd06c36fc (diff)
downloadvim-git-142a9758151e470307a80ea37b06ea34558ff5b3.tar.gz
patch 8.1.0589: compilation error in gvimext.cppv8.1.0589
Problem: Compilation error in gvimext.cpp. Solution: Return a value. Also fix using uninitialized variable.
-rw-r--r--src/GvimExt/gvimext.cpp7
-rw-r--r--src/dosinst.c2
-rw-r--r--src/version.c2
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
@@ -800,6 +800,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 589,
+/**/
588,
/**/
587,