1
0
forked from aniani/vim

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.
This commit is contained in:
Bram Moolenaar
2017-03-19 21:47:50 +01:00
parent 15618fa643
commit 1662ce104e
4 changed files with 8 additions and 5 deletions

View 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);