mirror of
https://github.com/curl/curl.git
synced 2025-01-18 14:04:30 +08:00
Fix build warnings.
Signed-off-by: Ben Greear <greearb@candelatech.com>
This commit is contained in:
parent
368fd5d27b
commit
700335103e
@ -46,7 +46,7 @@ Curl_HMAC_init(const HMAC_params * hashparams,
|
||||
const unsigned char * key,
|
||||
unsigned int keylen)
|
||||
{
|
||||
unsigned int i;
|
||||
size_t i;
|
||||
HMAC_context * ctxt;
|
||||
unsigned char * hkey;
|
||||
unsigned char b;
|
||||
|
@ -251,7 +251,7 @@ CURLcode Curl_wait_for_resolv(struct connectdata *conn,
|
||||
second is left, otherwise just use 1000ms to make sure the progress
|
||||
callback gets called frequent enough */
|
||||
if(!tvp->tv_sec)
|
||||
timeout_ms = tvp->tv_usec/1000;
|
||||
timeout_ms = (int)(tvp->tv_usec/1000);
|
||||
else
|
||||
timeout_ms = 1000;
|
||||
|
||||
|
29
lib/smtp.c
29
lib/smtp.c
@ -333,11 +333,11 @@ static CURLcode smtp_state_helo(struct connectdata *conn)
|
||||
return CURLE_OK;
|
||||
}
|
||||
|
||||
static int smtp_auth_plain_data(struct connectdata * conn, char * * outptr)
|
||||
static size_t smtp_auth_plain_data(struct connectdata * conn, char * * outptr)
|
||||
{
|
||||
char plainauth[2 * MAX_CURL_USER_LENGTH + MAX_CURL_PASSWORD_LENGTH];
|
||||
unsigned int ulen;
|
||||
unsigned int plen;
|
||||
size_t ulen;
|
||||
size_t plen;
|
||||
|
||||
ulen = strlen(conn->user);
|
||||
plen = strlen(conn->passwd);
|
||||
@ -353,9 +353,9 @@ static int smtp_auth_plain_data(struct connectdata * conn, char * * outptr)
|
||||
return Curl_base64_encode(conn->data, plainauth, 2 * ulen + plen + 2, outptr);
|
||||
}
|
||||
|
||||
static int smtp_auth_login_user(struct connectdata * conn, char * * outptr)
|
||||
static size_t smtp_auth_login_user(struct connectdata * conn, char * * outptr)
|
||||
{
|
||||
int ulen;
|
||||
size_t ulen;
|
||||
|
||||
ulen = strlen(conn->user);
|
||||
|
||||
@ -373,7 +373,7 @@ static CURLcode smtp_authenticate(struct connectdata *conn)
|
||||
struct smtp_conn *smtpc = &conn->proto.smtpc;
|
||||
char * initresp;
|
||||
const char * mech;
|
||||
int l;
|
||||
size_t l;
|
||||
int state1;
|
||||
int state2;
|
||||
|
||||
@ -527,7 +527,7 @@ static CURLcode smtp_state_authplain_resp(struct connectdata *conn,
|
||||
{
|
||||
CURLcode result = CURLE_OK;
|
||||
struct SessionHandle *data = conn->data;
|
||||
int l;
|
||||
size_t l;
|
||||
char * plainauth;
|
||||
|
||||
(void)instate; /* no use for this yet */
|
||||
@ -560,7 +560,7 @@ static CURLcode smtp_state_authlogin_resp(struct connectdata *conn,
|
||||
{
|
||||
CURLcode result = CURLE_OK;
|
||||
struct SessionHandle *data = conn->data;
|
||||
int l;
|
||||
size_t l;
|
||||
char * authuser;
|
||||
|
||||
(void)instate; /* no use for this yet */
|
||||
@ -593,8 +593,8 @@ static CURLcode smtp_state_authpasswd_resp(struct connectdata *conn,
|
||||
{
|
||||
CURLcode result = CURLE_OK;
|
||||
struct SessionHandle *data = conn->data;
|
||||
int plen;
|
||||
int l;
|
||||
size_t plen;
|
||||
size_t l;
|
||||
char * authpasswd;
|
||||
|
||||
(void)instate; /* no use for this yet */
|
||||
@ -637,8 +637,8 @@ static CURLcode smtp_state_authcram_resp(struct connectdata *conn,
|
||||
struct SessionHandle *data = conn->data;
|
||||
char * chlg64 = data->state.buffer;
|
||||
unsigned char * chlg;
|
||||
int chlglen;
|
||||
int l;
|
||||
size_t chlglen;
|
||||
size_t l;
|
||||
char * rplyb64;
|
||||
HMAC_context * ctxt;
|
||||
unsigned char digest[16];
|
||||
@ -674,7 +674,8 @@ static CURLcode smtp_state_authcram_resp(struct connectdata *conn,
|
||||
|
||||
/* Compute digest. */
|
||||
ctxt = Curl_HMAC_init(Curl_HMAC_MD5,
|
||||
(const unsigned char *) conn->passwd, strlen(conn->passwd));
|
||||
(const unsigned char *) conn->passwd,
|
||||
(unsigned int)(strlen(conn->passwd)));
|
||||
|
||||
if(!ctxt) {
|
||||
if(chlg)
|
||||
@ -684,7 +685,7 @@ static CURLcode smtp_state_authcram_resp(struct connectdata *conn,
|
||||
}
|
||||
|
||||
if(chlglen > 0)
|
||||
Curl_HMAC_update(ctxt, chlg, chlglen);
|
||||
Curl_HMAC_update(ctxt, chlg, (unsigned int)(chlglen));
|
||||
|
||||
if(chlg)
|
||||
free(chlg);
|
||||
|
Loading…
Reference in New Issue
Block a user