]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.0.0494: build failure with older compiler on MS-Windows v8.0.0494
authorBram Moolenaar <Bram@vim.org>
Sun, 19 Mar 2017 20:47:50 +0000 (21:47 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 19 Mar 2017 20:47:50 +0000 (21:47 +0100)
Problem:    Build failure with older compiler on MS-Windows.
Solution:   Move declaration to start of block.

src/evalfunc.c
src/main.c
src/os_mswin.c
src/version.c

index 83ff48f8cabf4e09266d0e14fe851ebfc82dbf14..5dc7f827300f60f4b0de5a051ae106b4ed748ec4 100644 (file)
@@ -8677,14 +8677,15 @@ f_remote_read(typval_T *argvars UNUSED, typval_T *rettv)
     if (serverid != NULL && !check_restricted() && !check_secure())
     {
        int timeout = 0;
+# ifdef WIN32
+       /* The server's HWND is encoded in the 'id' parameter */
+       long_u          n = 0;
+# endif
 
        if (argvars[1].v_type != VAR_UNKNOWN)
            timeout = get_tv_number(&argvars[1]);
 
 # ifdef WIN32
-       /* The server's HWND is encoded in the 'id' parameter */
-       long_u          n = 0;
-
        sscanf((char *)serverid, SCANF_HEX_LONG_U, &n);
        if (n != 0)
            r = serverGetReply((HWND)n, FALSE, TRUE, TRUE, timeout);
index 66db3ebc7b1d53b205dbfc0988d194fd7e8b4fe5..78b61228aa178aecc7b2515c09cd549656db26a8 100644 (file)
@@ -4194,7 +4194,7 @@ sendToLocalVim(char_u *cmd, int asExpr, char_u **result)
                size_t  len = STRLEN(cmd) + STRLEN(err) + 5;
                char_u  *msg;
 
-               msg = alloc(len);
+               msg = alloc((unsigned)len);
                if (msg != NULL)
                    vim_snprintf((char *)msg, len, "%s: \"%s\"", err, cmd);
                *result = msg;
index cf8adda7641496a06c0f759486038d24e9037262..696847e50c7ad36d5a45a0779e871568daacb213 100644 (file)
@@ -2111,7 +2111,7 @@ Messaging_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
                char    *err = _(e_invexprmsg);
                size_t  len = STRLEN(str) + STRLEN(err) + 5;
 
-               res = alloc(len);
+               res = alloc((unsigned)len);
                if (res != NULL)
                    vim_snprintf((char *)res, len, "%s: \"%s\"", err, str);
                reply.dwData = COPYDATA_ERROR_RESULT;
index 72516f05c5c420c1a5fdd303cffdeb7ff77167b9..343b856ffde873fcac29f8e83d0540a35a197b2f 100644 (file)
@@ -764,6 +764,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    494,
 /**/
     493,
 /**/