patch 7.4.1334
Problem: Many compiler warnings with MingW.
Solution: Add type casts. (Yasuhiro Matsumoto)
diff --git a/src/channel.c b/src/channel.c
index 28fee0a..e0ae267 100644
--- a/src/channel.c
+++ b/src/channel.c
@@ -58,7 +58,7 @@
#ifdef WIN32
static int
-fd_read(sock_T fd, char_u *buf, size_t len)
+fd_read(sock_T fd, char *buf, size_t len)
{
HANDLE h = (HANDLE)fd;
DWORD nread;
@@ -69,7 +69,7 @@
}
static int
-fd_write(sock_T fd, char_u *buf, size_t len)
+fd_write(sock_T fd, char *buf, size_t len)
{
HANDLE h = (HANDLE)fd;
DWORD nwrite;
@@ -1393,7 +1393,7 @@
/* reading from a pipe, not a socket */
while (TRUE)
{
- if (PeekNamedPipe(fd, NULL, 0, NULL, &nread, NULL) && nread > 0)
+ if (PeekNamedPipe((HANDLE)fd, NULL, 0, NULL, &nread, NULL) && nread > 0)
return OK;
diff = deadline - GetTickCount();
if (diff < 0)
@@ -1509,9 +1509,9 @@
if (channel_wait(channel, fd, 0) == FAIL)
break;
if (use_socket)
- len = sock_read(fd, buf, MAXMSGSIZE);
+ len = sock_read(fd, (char *)buf, MAXMSGSIZE);
else
- len = fd_read(fd, buf, MAXMSGSIZE);
+ len = fd_read(fd, (char *)buf, MAXMSGSIZE);
if (len <= 0)
break; /* error or nothing more to read */
@@ -1713,9 +1713,9 @@
}
if (use_socket)
- res = sock_write(fd, buf, len);
+ res = sock_write(fd, (char *)buf, len);
else
- res = fd_write(fd, buf, len);
+ res = fd_write(fd, (char *)buf, len);
if (res != len)
{
if (!channel->ch_error && fun != NULL)