diff options
author | Daniel Stenberg <daniel@haxx.se> | 2002-08-26 17:20:29 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2002-08-26 17:20:29 +0000 |
commit | 982c5460f0eb521ce4f9526535e9d122fe8755bd (patch) | |
tree | fd0a68cad53523ba47817aa4c7764d288ee00f3d /lib | |
parent | 2a3a8848f35e6cb561fdb8d9303819e327029b81 (diff) |
Andrew Francis removed the need for/use of MSVC pragmas
Diffstat (limited to 'lib')
-rw-r--r-- | lib/config-win32.h | 2 | ||||
-rw-r--r-- | lib/connect.c | 2 | ||||
-rw-r--r-- | lib/http.c | 2 | ||||
-rw-r--r-- | lib/progress.c | 6 | ||||
-rw-r--r-- | lib/url.c | 4 |
5 files changed, 8 insertions, 8 deletions
diff --git a/lib/config-win32.h b/lib/config-win32.h index 5cf10514d..1e0622941 100644 --- a/lib/config-win32.h +++ b/lib/config-win32.h @@ -202,7 +202,7 @@ *This is to eliminate the warnings when compiled * * using MS VC++ compiler * **************************************************/ -#ifdef _MSC_VER +#if 0 #pragma warning (disable: 4244) /* truncation from 'const int' to 'char' */ #pragma warning (disable: 4127) /* conditional expression is constant */ diff --git a/lib/connect.c b/lib/connect.c index 9bbf8409c..a90b87e17 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -602,7 +602,7 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */ (struct in_addr *)remotehost->h_addr_list[aliasindex], sizeof(struct in_addr)); serv_addr.sin_family = remotehost->h_addrtype; - serv_addr.sin_port = htons(port); + serv_addr.sin_port = htons((unsigned short)port); rc = connect(sockfd, (struct sockaddr *)&serv_addr, sizeof(serv_addr)); diff --git a/lib/http.c b/lib/http.c index 763b90a3a..66fa234ec 100644 --- a/lib/http.c +++ b/lib/http.c @@ -552,7 +552,7 @@ CURLcode Curl_http(struct connectdata *conn) if(data->cookies) { co = Curl_cookie_getlist(data->cookies, host, ppath, - conn->protocol&PROT_HTTPS?TRUE:FALSE); + (conn->protocol&PROT_HTTPS?TRUE:FALSE)); } if (data->change.proxy && !data->set.tunnel_thru_httpproxy && diff --git a/lib/progress.c b/lib/progress.c index 6a9ebc5a4..3ca71f117 100644 --- a/lib/progress.c +++ b/lib/progress.c @@ -344,8 +344,8 @@ int Curl_pgrsUpdate(struct connectdata *conn) /* If we have a total estimate, we can display that and the expected time left */ if(total_estimate) { - time2str(time_left, total_estimate-(int) data->progress.timespent); - time2str(time_total, total_estimate); + time2str(time_left, (int)(total_estimate - data->progress.timespent)); + time2str(time_total, (int)total_estimate); } else { /* otherwise we blank those times */ @@ -353,7 +353,7 @@ int Curl_pgrsUpdate(struct connectdata *conn) strcpy(time_total, "--:--:--"); } /* The time spent so far is always known */ - time2str(time_current, data->progress.timespent); + time2str(time_current, (int)data->progress.timespent); /* Get the total amount of data expected to get transfered */ total_expected_transfer = @@ -1349,7 +1349,7 @@ static CURLcode ConnectPlease(struct connectdata *conn, memcpy((char *)&(conn->serv_addr.sin_addr), (struct in_addr *)addr, sizeof(struct in_addr)); conn->serv_addr.sin_family = hostaddr->h_addrtype; - conn->serv_addr.sin_port = htons(conn->port); + conn->serv_addr.sin_port = htons((unsigned short)conn->port); #endif } @@ -2078,7 +2078,7 @@ static CURLcode CreateConnection(struct SessionHandle *data, } *tmp = '\0'; /* cut off the name there */ - conn->remote_port = port; + conn->remote_port = (unsigned short)port; } } |