changeset 11215:2e4877acfe0a v8.0.0494

patch 8.0.0494: build failure with older compiler on MS-Windows commit https://github.com/vim/vim/commit/1662ce104e47f6a1eb0c2004d86b995f74dc4652 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Mar 19 21:47:50 2017 +0100 patch 8.0.0494: build failure with older compiler on MS-Windows Problem: Build failure with older compiler on MS-Windows. Solution: Move declaration to start of block.
author Christian Brabandt <cb@256bit.org>
date Sun, 19 Mar 2017 22:00:04 +0100
parents 6a6e9495cff4
children 486e00f72582
files src/evalfunc.c src/main.c src/os_mswin.c src/version.c
diffstat 4 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -8677,14 +8677,15 @@ f_remote_read(typval_T *argvars UNUSED, 
     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);
--- a/src/main.c
+++ b/src/main.c
@@ -4194,7 +4194,7 @@ sendToLocalVim(char_u *cmd, int asExpr, 
 		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;
--- a/src/os_mswin.c
+++ b/src/os_mswin.c
@@ -2111,7 +2111,7 @@ Messaging_WndProc(HWND hwnd, UINT msg, W
 		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;
--- a/src/version.c
+++ b/src/version.c
@@ -765,6 +765,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    494,
+/**/
     493,
 /**/
     492,