[warnings] fix integer narrowing

This commit is contained in:
akallabeth 2024-10-03 13:15:24 +02:00
parent 83921b0f67
commit 142d112eee
No known key found for this signature in database
GPG Key ID: A49454A3FC909FD5

View File

@ -208,7 +208,7 @@ static BOOL wst_recv_auth_token(rdpCredsspAuth* auth, HttpResponse* response)
return TRUE; return TRUE;
} }
static BOOL wst_tls_connect(rdpWst* wst, rdpTls* tls, int timeout) static BOOL wst_tls_connect(rdpWst* wst, rdpTls* tls, UINT32 timeout)
{ {
WINPR_ASSERT(wst); WINPR_ASSERT(wst);
WINPR_ASSERT(tls); WINPR_ASSERT(tls);
@ -269,7 +269,7 @@ static BOOL wst_tls_connect(rdpWst* wst, rdpTls* tls, int timeout)
} }
tls->hostname = wst->gwhostname; tls->hostname = wst->gwhostname;
tls->port = wst->gwport; tls->port = MIN(UINT16_MAX, wst->gwport);
tls->isGatewayTransport = TRUE; tls->isGatewayTransport = TRUE;
status = freerdp_tls_connect(tls, bufferedBio); status = freerdp_tls_connect(tls, bufferedBio);
if (status < 1) if (status < 1)
@ -346,7 +346,7 @@ static BOOL wst_send_http_request(rdpWst* wst, rdpTls* tls)
sz = Stream_Length(s); sz = Stream_Length(s);
if (sz <= INT_MAX) if (sz <= INT_MAX)
status = freerdp_tls_write_all(tls, Stream_Buffer(s), (int)sz); status = freerdp_tls_write_all(tls, Stream_Buffer(s), sz);
Stream_Free(s, TRUE); Stream_Free(s, TRUE);
return (status >= 0); return (status >= 0);