Skip to content

Commit 1662ce1

Browse files
committed
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.
1 parent 15618fa commit 1662ce1

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

src/evalfunc.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8677,14 +8677,15 @@ f_remote_read(typval_T *argvars UNUSED, typval_T *rettv)
86778677
if (serverid != NULL && !check_restricted() && !check_secure())
86788678
{
86798679
int timeout = 0;
8680+
# ifdef WIN32
8681+
/* The server's HWND is encoded in the 'id' parameter */
8682+
long_u n = 0;
8683+
# endif
86808684

86818685
if (argvars[1].v_type != VAR_UNKNOWN)
86828686
timeout = get_tv_number(&argvars[1]);
86838687

86848688
# ifdef WIN32
8685-
/* The server's HWND is encoded in the 'id' parameter */
8686-
long_u n = 0;
8687-
86888689
sscanf((char *)serverid, SCANF_HEX_LONG_U, &n);
86898690
if (n != 0)
86908691
r = serverGetReply((HWND)n, FALSE, TRUE, TRUE, timeout);

src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4194,7 +4194,7 @@ sendToLocalVim(char_u *cmd, int asExpr, char_u **result)
41944194
size_t len = STRLEN(cmd) + STRLEN(err) + 5;
41954195
char_u *msg;
41964196

4197-
msg = alloc(len);
4197+
msg = alloc((unsigned)len);
41984198
if (msg != NULL)
41994199
vim_snprintf((char *)msg, len, "%s: \"%s\"", err, cmd);
42004200
*result = msg;

src/os_mswin.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2111,7 +2111,7 @@ Messaging_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
21112111
char *err = _(e_invexprmsg);
21122112
size_t len = STRLEN(str) + STRLEN(err) + 5;
21132113

2114-
res = alloc(len);
2114+
res = alloc((unsigned)len);
21152115
if (res != NULL)
21162116
vim_snprintf((char *)res, len, "%s: \"%s\"", err, str);
21172117
reply.dwData = COPYDATA_ERROR_RESULT;

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,8 @@ static char *(features[]) =
764764

765765
static int included_patches[] =
766766
{ /* Add new patch number below this line */
767+
/**/
768+
494,
767769
/**/
768770
493,
769771
/**/

0 commit comments

Comments
 (0)