aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/formdata.c2
-rw-r--r--lib/multi.c2
-rw-r--r--lib/select.c4
-rw-r--r--lib/strerror.c3
4 files changed, 6 insertions, 5 deletions
diff --git a/lib/formdata.c b/lib/formdata.c
index 958e6cd2a..86c297745 100644
--- a/lib/formdata.c
+++ b/lib/formdata.c
@@ -1279,7 +1279,7 @@ static size_t readfromfile(struct Form *form, char *buffer, size_t size)
/* this file hasn't yet been opened */
form->fp = fopen(form->data->line, "rb"); /* b is for binary */
if(!form->fp)
- return -1; /* failure */
+ return (size_t)-1; /* failure */
}
nread = fread(buffer, 1, size, form->fp);
diff --git a/lib/multi.c b/lib/multi.c
index ee7e388fa..c0f9a7918 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -780,7 +780,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
/* if we failed anywhere, we must clean up the secondary socket if
it was used */
sclose(easy->easy_conn->sock[SECONDARYSOCKET]);
- easy->easy_conn->sock[SECONDARYSOCKET]=-1;
+ easy->easy_conn->sock[SECONDARYSOCKET] = CURL_SOCKET_BAD;
}
Curl_posttransfer(easy->easy_handle);
Curl_done(&easy->easy_conn, easy->result);
diff --git a/lib/select.c b/lib/select.c
index 343dc469f..cf5f15a8f 100644
--- a/lib/select.c
+++ b/lib/select.c
@@ -131,7 +131,7 @@ int Curl_select(curl_socket_t readfd, curl_socket_t writefd, int timeout_ms)
timeout.tv_usec = (timeout_ms % 1000) * 1000;
FD_ZERO(&fds_err);
- maxfd = -1;
+ maxfd = (curl_socket_t)-1;
FD_ZERO(&fds_read);
if (readfd != CURL_SOCKET_BAD) {
@@ -206,7 +206,7 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms)
FD_ZERO(&fds_read);
FD_ZERO(&fds_write);
FD_ZERO(&fds_err);
- maxfd = -1;
+ maxfd = (curl_socket_t)-1;
for (i = 0; i < nfds; i++) {
if (ufds[i].fd == CURL_SOCKET_BAD)
diff --git a/lib/strerror.c b/lib/strerror.c
index b035e6772..faa750856 100644
--- a/lib/strerror.c
+++ b/lib/strerror.c
@@ -519,10 +519,11 @@ get_winsock_error (int err, char *buf, size_t len)
case WSAEREMOTE:
p = "Remote error";
break;
+#ifdef WSAEDISCON /* missing in SalfordC! */
case WSAEDISCON:
p = "Disconnected";
break;
-
+#endif
/* Extended Winsock errors */
case WSASYSNOTREADY:
p = "Winsock library is not ready";