Added missing casts to suppress compiler warnings

This commit is contained in:
goldsimon 2010-02-05 10:08:41 +00:00
parent 5d360a6711
commit c58dfa2156
4 changed files with 8 additions and 8 deletions

View File

@ -1093,7 +1093,7 @@ get_secret(int unit, char *client, char *server, char *secret, int *secret_len,
return 0;
}
len = strlen(ppp_settings.passwd);
len = (int)strlen(ppp_settings.passwd);
if (len > MAXSECRETLEN) {
AUTHDEBUG((LOG_ERR, "Secret for %s on %s is too long\n", client, server));
len = MAXSECRETLEN;

View File

@ -714,7 +714,7 @@ ChapSendChallenge(chap_state *cstate)
int outlen;
chal_len = cstate->chal_len;
name_len = strlen(cstate->chal_name);
name_len = (int)strlen(cstate->chal_name);
outlen = CHAP_HEADERLEN + sizeof (u_char) + chal_len + name_len;
outp = outpacket_buf[cstate->unit];
@ -754,7 +754,7 @@ ChapSendStatus(chap_state *cstate, int code)
} else {
strcpy(msg, "I don't like you. Go 'way.");
}
msglen = strlen(msg);
msglen = (int)strlen(msg);
outlen = CHAP_HEADERLEN + msglen;
outp = outpacket_buf[cstate->unit];
@ -814,7 +814,7 @@ ChapSendResponse(chap_state *cstate)
int outlen, md_len, name_len;
md_len = cstate->resp_length;
name_len = strlen(cstate->resp_name);
name_len = (int)strlen(cstate->resp_name);
outlen = CHAP_HEADERLEN + sizeof (u_char) + md_len + name_len;
outp = outpacket_buf[cstate->unit];

View File

@ -166,9 +166,9 @@ upap_authwithpeer(int unit, char *user, char *password)
/* Save the username and password we're given */
u->us_user = user;
u->us_userlen = strlen(user);
u->us_userlen = (int)strlen(user);
u->us_passwd = password;
u->us_passwdlen = strlen(password);
u->us_passwdlen = (int)strlen(password);
u->us_transmits = 0;

View File

@ -787,11 +787,11 @@ pppoe_send_padi(struct pppoe_softc *sc)
/* calculate length of frame (excluding ethernet header + pppoe header) */
len = 2 + 2 + 2 + 2 + sizeof sc; /* service name tag is required, host unique is send too */
if (sc->sc_service_name != NULL) {
l1 = strlen(sc->sc_service_name);
l1 = (int)strlen(sc->sc_service_name);
len += l1;
}
if (sc->sc_concentrator_name != NULL) {
l2 = strlen(sc->sc_concentrator_name);
l2 = (int)strlen(sc->sc_concentrator_name);
len += 2 + 2 + l2;
}
LWIP_ASSERT("sizeof(struct eth_hdr) + PPPOE_HEADERLEN + len <= 0xffff",