compiler warning fix
This commit is contained in:
parent
8337a375dd
commit
c26ec47e90
@ -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", ntohs(port));
|
sprintf(tmpbuf, "%u", (unsigned short)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);
|
||||||
|
@ -134,6 +134,10 @@ Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
|
|||||||
|
|
||||||
*waitp = 0; /* don't wait, we act synchronously */
|
*waitp = 0; /* don't wait, we act synchronously */
|
||||||
|
|
||||||
|
#if defined(HAVE_GETHOSTBYNAME_R_3) || defined(HAVE_GETHOSTBYNAME_R_6)
|
||||||
|
int res = ERANGE;
|
||||||
|
#endif
|
||||||
|
|
||||||
if(1 == Curl_inet_pton(AF_INET, hostname, &in))
|
if(1 == Curl_inet_pton(AF_INET, hostname, &in))
|
||||||
/* This is a dotted IP address 123.123.123.123-style */
|
/* This is a dotted IP address 123.123.123.123-style */
|
||||||
return Curl_ip2addr(in, hostname, port);
|
return Curl_ip2addr(in, hostname, port);
|
||||||
@ -146,7 +150,6 @@ Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
|
|||||||
*/
|
*/
|
||||||
else {
|
else {
|
||||||
int h_errnop;
|
int h_errnop;
|
||||||
int res=ERANGE;
|
|
||||||
|
|
||||||
buf = (struct hostent *)calloc(CURL_HOSTENT_SIZE, 1);
|
buf = (struct hostent *)calloc(CURL_HOSTENT_SIZE, 1);
|
||||||
if(!buf)
|
if(!buf)
|
||||||
@ -159,7 +162,6 @@ Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
|
|||||||
|
|
||||||
#ifdef HAVE_GETHOSTBYNAME_R_5
|
#ifdef HAVE_GETHOSTBYNAME_R_5
|
||||||
/* Solaris, IRIX and more */
|
/* Solaris, IRIX and more */
|
||||||
(void)res; /* prevent compiler warning */
|
|
||||||
h = gethostbyname_r(hostname,
|
h = gethostbyname_r(hostname,
|
||||||
(struct hostent *)buf,
|
(struct hostent *)buf,
|
||||||
(char *)buf + sizeof(struct hostent),
|
(char *)buf + sizeof(struct hostent),
|
||||||
|
@ -422,7 +422,8 @@ char *glob_next_url(URLGlob *glob)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case UPTCharRange:
|
case UPTCharRange:
|
||||||
pat->content.CharRange.ptr_c += (char)(pat->content.CharRange.step);
|
pat->content.CharRange.ptr_c = (char)(pat->content.CharRange.step +
|
||||||
|
(int)((unsigned char)pat->content.CharRange.ptr_c));
|
||||||
if (pat->content.CharRange.ptr_c > pat->content.CharRange.max_c) {
|
if (pat->content.CharRange.ptr_c > pat->content.CharRange.max_c) {
|
||||||
pat->content.CharRange.ptr_c = pat->content.CharRange.min_c;
|
pat->content.CharRange.ptr_c = pat->content.CharRange.min_c;
|
||||||
carry = TRUE;
|
carry = TRUE;
|
||||||
|
@ -258,7 +258,7 @@ static void read_ahead(struct testcase *test,
|
|||||||
newline = 1;
|
newline = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*p++ = c;
|
*p++ = (char)c;
|
||||||
}
|
}
|
||||||
b->counter = (int)(p - dp->th_data);
|
b->counter = (int)(p - dp->th_data);
|
||||||
}
|
}
|
||||||
@ -611,7 +611,7 @@ again:
|
|||||||
|
|
||||||
for (cp = mode; *cp; cp++)
|
for (cp = mode; *cp; cp++)
|
||||||
if (isupper((int)*cp))
|
if (isupper((int)*cp))
|
||||||
*cp = tolower((int)*cp);
|
*cp = (char)tolower((int)*cp);
|
||||||
|
|
||||||
/* store input protocol */
|
/* store input protocol */
|
||||||
fprintf(test->server, "mode: %s\n", mode);
|
fprintf(test->server, "mode: %s\n", mode);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user