Fix compiling on MS VS 2022 (64-Bit) without type conversion warnings

This commit is contained in:
Simon Goldschmidt
2026-05-12 21:29:38 +02:00
parent 0c3a93efe3
commit c4d3527a11
5 changed files with 19 additions and 13 deletions

View File

@@ -1919,7 +1919,7 @@ int get_secret(ppp_pcb *pcb, const char *client, const char *server, char *secre
}
MEMCPY(secret, pcb->settings.passwd, len);
*secret_len = len;
*secret_len = (int)len;
return 1;
#if 0 /* UNUSED */

View File

@@ -480,7 +480,7 @@ static void chap_respond(ppp_pcb *pcb, int id,
memset(secret, 0, secret_len);
clen = *outp;
nlen = strlen(pcb->chap_client.name);
nlen = (int)strlen(pcb->chap_client.name);
memcpy(outp + clen + 1, pcb->chap_client.name, nlen);
outp = (u_char*)p->payload + PPP_HDRLEN;

View File

@@ -289,7 +289,7 @@ int ppp_vslprintf(char *buf, int buflen, const char *fmt, va_list args) {
if (fillch == '0' && prec >= 0) {
n = prec;
} else {
n = strlen((const char *)p);
n = (int)strlen((const char *)p);
if (prec >= 0 && n > prec)
n = prec;
}
@@ -378,7 +378,7 @@ int ppp_vslprintf(char *buf, int buflen, const char *fmt, va_list args) {
}
len = num + sizeof(num) - 1 - str;
} else {
len = strlen(str);
len = (int)strlen(str);
if (prec >= 0 && len > prec)
len = prec;
}