diff options
author | Gisle Vanem <gvanem@broadpark.no> | 2006-04-26 17:26:22 +0000 |
---|---|---|
committer | Gisle Vanem <gvanem@broadpark.no> | 2006-04-26 17:26:22 +0000 |
commit | 12db20be4e8b0130aba7342a1124eb85e3115822 (patch) | |
tree | 4d754b6232fe7b739396ff97060d3c90ecba27a1 /lib | |
parent | 3cbb1b2b64453c5504df5696ffbf72cb08e43f9c (diff) |
Fixed signed/unsigned convertion errors in Salford-C.
#ifdef around WSAEDISCON in strerror.c.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/formdata.c | 2 | ||||
-rw-r--r-- | lib/multi.c | 2 | ||||
-rw-r--r-- | lib/select.c | 4 | ||||
-rw-r--r-- | lib/strerror.c | 3 |
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"; |