mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
compiler warning fix
This commit is contained in:
parent
01c4fba15c
commit
bc2183b440
@ -305,7 +305,7 @@ static char *lookup_service(unsigned short port, int flags,
|
|||||||
strcpy(tmpbuf, sep->s_name);
|
strcpy(tmpbuf, sep->s_name);
|
||||||
else
|
else
|
||||||
/* get port as a string */
|
/* get port as a string */
|
||||||
sprintf(tmpbuf, "%u", (unsigned short)ntohs(port));
|
sprintf(tmpbuf, "%u", (unsigned int)ntohs(port));
|
||||||
if (strlen(tmpbuf) < buflen)
|
if (strlen(tmpbuf) < buflen)
|
||||||
/* return it if buffer big enough */
|
/* return it if buffer big enough */
|
||||||
strcpy(buf, tmpbuf);
|
strcpy(buf, tmpbuf);
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2006, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@ -125,7 +125,7 @@ Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
|
|||||||
int *waitp)
|
int *waitp)
|
||||||
{
|
{
|
||||||
#if defined(HAVE_GETHOSTBYNAME_R_3) || defined(HAVE_GETHOSTBYNAME_R_6)
|
#if defined(HAVE_GETHOSTBYNAME_R_3) || defined(HAVE_GETHOSTBYNAME_R_6)
|
||||||
int res = ERANGE;
|
int res;
|
||||||
#endif
|
#endif
|
||||||
Curl_addrinfo *ai = NULL;
|
Curl_addrinfo *ai = NULL;
|
||||||
struct hostent *h = NULL;
|
struct hostent *h = NULL;
|
||||||
@ -380,7 +380,7 @@ Curl_addrinfo *Curl_he2ai(const struct hostent *he, int port)
|
|||||||
addr = (struct sockaddr_in *)ai->ai_addr; /* storage area for this info */
|
addr = (struct sockaddr_in *)ai->ai_addr; /* storage area for this info */
|
||||||
|
|
||||||
memcpy((char *)&(addr->sin_addr), curr, sizeof(struct in_addr));
|
memcpy((char *)&(addr->sin_addr), curr, sizeof(struct in_addr));
|
||||||
addr->sin_family = he->h_addrtype;
|
addr->sin_family = (unsigned short)(he->h_addrtype);
|
||||||
addr->sin_port = htons((unsigned short)port);
|
addr->sin_port = htons((unsigned short)port);
|
||||||
|
|
||||||
prevai = ai;
|
prevai = ai;
|
||||||
|
@ -583,7 +583,7 @@ CURLcode Curl_tftp_connect(struct connectdata *conn, bool *done)
|
|||||||
state->state = TFTP_STATE_START;
|
state->state = TFTP_STATE_START;
|
||||||
|
|
||||||
((struct sockaddr *)&state->local_addr)->sa_family =
|
((struct sockaddr *)&state->local_addr)->sa_family =
|
||||||
conn->ip_addr->ai_family;
|
(unsigned short)(conn->ip_addr->ai_family);
|
||||||
|
|
||||||
tftp_set_timeouts(state);
|
tftp_set_timeouts(state);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user