summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2003-05-07 14:27:32 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2003-05-07 14:27:32 (GMT)
commita43ce2c320786f6065886469aa964b99f49d9c9c (patch)
tree11db0ee1375fa3b6ab04712ba72eedbc2952d794
parentc5a0dfa1d1b4b2c090fda2670ac3b35215e87b95 (diff)
downloadCMake-a43ce2c320786f6065886469aa964b99f49d9c9c.zip
CMake-a43ce2c320786f6065886469aa964b99f49d9c9c.tar.gz
CMake-a43ce2c320786f6065886469aa964b99f49d9c9c.tar.bz2
ERR: Fix some HP specific warnings
-rw-r--r--Source/CTest/Curl/connect.c12
-rw-r--r--Source/CTest/Curl/ftp.c16
-rw-r--r--Source/CTest/Curl/telnet.c2
-rw-r--r--Source/CTest/Curl/url.c4
4 files changed, 27 insertions, 7 deletions
diff --git a/Source/CTest/Curl/connect.c b/Source/CTest/Curl/connect.c
index 0f95bd5..2165271 100644
--- a/Source/CTest/Curl/connect.c
+++ b/Source/CTest/Curl/connect.c
@@ -269,9 +269,13 @@ static CURLcode bindlocal(struct connectdata *conn,
/* we succeeded to bind */
struct sockaddr_in add;
- size = sizeof(add);
+#ifdef __hpux
+ int gsize = sizeof(add);
+#else
+ socklen_t gsize = sizeof(add);
+#endif
if(getsockname(sockfd, (struct sockaddr *) &add,
- (socklen_t *)&size)<0) {
+ &gsize)<0) {
failf(data, "getsockname() failed");
return CURLE_HTTP_PORT_FAILED;
}
@@ -337,7 +341,11 @@ static
int socketerror(int sockfd)
{
int err = 0;
+#ifdef __hpux
+ int errSize = sizeof(err);
+#else
socklen_t errSize = sizeof(err);
+#endif
if( -1 == getsockopt(sockfd, SOL_SOCKET, SO_ERROR,
(void *)&err, &errSize))
diff --git a/Source/CTest/Curl/ftp.c b/Source/CTest/Curl/ftp.c
index d9de103..0163d3a 100644
--- a/Source/CTest/Curl/ftp.c
+++ b/Source/CTest/Curl/ftp.c
@@ -142,11 +142,15 @@ static CURLcode AllowServerConnect(struct SessionHandle *data,
/* we have received data here */
{
int s;
+#ifdef __hpux
+ int size = sizeof(struct sockaddr_in);
+#else
socklen_t size = sizeof(struct sockaddr_in);
+#endif
struct sockaddr_in add;
- getsockname(sock, (struct sockaddr *) &add, (socklen_t *)&size);
- s=(int)accept(sock, (struct sockaddr *) &add, (socklen_t *)&size);
+ getsockname(sock, (struct sockaddr *) &add, &size);
+ s=(int)accept(sock, (struct sockaddr *) &add, &size);
sclose(sock); /* close the first socket */
@@ -1220,7 +1224,11 @@ CURLcode ftp_use_port(struct connectdata *conn)
if(! *myhost) {
/* pick a suitable default here */
+#ifdef __hpux
+ int sslen;
+#else
socklen_t sslen;
+#endif
sslen = sizeof(sa);
if (getsockname(conn->firstsocket, (struct sockaddr *)&sa, &sslen) < 0) {
@@ -1259,7 +1267,11 @@ CURLcode ftp_use_port(struct connectdata *conn)
if(bind(portsock, (struct sockaddr *)&sa, size) >= 0) {
/* we succeeded to bind */
struct sockaddr_in add;
+#ifdef __hpux
+ int socksize = sizeof(add);
+#else
socklen_t socksize = sizeof(add);
+#endif
if(getsockname(portsock, (struct sockaddr *) &add,
&socksize)<0) {
diff --git a/Source/CTest/Curl/telnet.c b/Source/CTest/Curl/telnet.c
index 75dd03a..56d3ebd 100644
--- a/Source/CTest/Curl/telnet.c
+++ b/Source/CTest/Curl/telnet.c
@@ -454,7 +454,7 @@ void rec_wont(struct connectdata *conn, int option)
}
}
-void set_local_option(struct connectdata *conn, int option, int newstate)
+static void set_local_option(struct connectdata *conn, int option, int newstate)
{
struct TELNET *tn = (struct TELNET *)conn->proto.telnet;
if(newstate == YES)
diff --git a/Source/CTest/Curl/url.c b/Source/CTest/Curl/url.c
index b22510a..b7460cd 100644
--- a/Source/CTest/Curl/url.c
+++ b/Source/CTest/Curl/url.c
@@ -1391,8 +1391,8 @@ static int handleSock5Proxy(
int sock)
{
unsigned char socksreq[600]; /* room for large user/pw (255 max each) */
- int actualread;
- int written;
+ ssize_t actualread;
+ ssize_t written;
CURLcode result;
Curl_nonblock(sock, FALSE);