[warnings] fix uninitialized variables

This commit is contained in:
Armin Novak 2024-08-27 08:50:36 +02:00 committed by akallabeth
parent 6d994feef6
commit 03449da9e9
No known key found for this signature in database
GPG Key ID: A49454A3FC909FD5
3 changed files with 4 additions and 9 deletions

View File

@ -567,7 +567,7 @@ static BOOL rdstls_process_authentication_response(rdpRdstls* rdstls, wStream* s
WLog_Print(rdstls->log, WLOG_ERROR, "resultCode: %s [0x%08" PRIX32 "]",
rdstls_result_code_str(resultCode), resultCode);
UINT32 error;
UINT32 error = ERROR_INTERNAL_ERROR;
switch (resultCode)
{
case RDSTLS_RESULT_ACCESS_DENIED:

View File

@ -1311,8 +1311,8 @@ static BOOL is_accepted(rdpTls* tls, const rdpCertificate* cert)
rdpSettings* settings = tls->context->settings;
WINPR_ASSERT(settings);
FreeRDP_Settings_Keys_String keyAccepted;
FreeRDP_Settings_Keys_UInt32 keyLength;
FreeRDP_Settings_Keys_String keyAccepted = FreeRDP_AcceptedCert;
FreeRDP_Settings_Keys_UInt32 keyLength = FreeRDP_AcceptedCertLength;
if (tls->isGatewayTransport)
{
@ -1324,11 +1324,6 @@ static BOOL is_accepted(rdpTls* tls, const rdpCertificate* cert)
keyAccepted = FreeRDP_RedirectionAcceptedCert;
keyLength = FreeRDP_RedirectionAcceptedCertLength;
}
else
{
keyAccepted = FreeRDP_AcceptedCert;
keyLength = FreeRDP_AcceptedCertLength;
}
const char* AcceptedKey = freerdp_settings_get_string(settings, keyAccepted);
const UINT32 AcceptedKeyLength = freerdp_settings_get_uint32(settings, keyLength);

View File

@ -478,7 +478,7 @@ char* x509_utils_get_date(const X509* x509, BOOL startDate)
char* str = NULL;
if (ASN1_TIME_print(bmem, date))
{
BUF_MEM* bptr;
BUF_MEM* bptr = NULL;
BIO_get_mem_ptr(bmem, &bptr);
str = strndup(bptr->data, bptr->length);