[warnings] fix -Wsometimes-uninitialized

This commit is contained in:
akallabeth 2023-05-23 09:01:50 +02:00 committed by Martin Fleisz
parent 18cde293e8
commit 066276a85a
2 changed files with 5 additions and 3 deletions

View File

@ -1297,7 +1297,7 @@ static UINT rail_recv_client_cloak_order(RailServerContext* context, RAIL_CLOAK*
static UINT rail_recv_client_text_scale_order(RailServerContext* context, wStream* s)
{
UINT error;
UINT error = CHANNEL_RC_OK;
UINT32 TextScaleFactor;
if (!context || !s)
@ -1317,7 +1317,7 @@ static UINT rail_recv_client_text_scale_order(RailServerContext* context, wStrea
static UINT rail_recv_client_caret_blink(RailServerContext* context, wStream* s)
{
UINT error;
UINT error = CHANNEL_RC_OK;
UINT32 CaretBlinkRate;
if (!context || !s)

View File

@ -422,6 +422,8 @@ fail:
char* freerdp_key_get_param(const rdpPrivateKey* key, enum FREERDP_KEY_PARAM param, size_t* plength)
{
BYTE* buf = NULL;
WINPR_ASSERT(key);
WINPR_ASSERT(plength);
@ -482,7 +484,7 @@ char* freerdp_key_get_param(const rdpPrivateKey* key, enum FREERDP_KEY_PARAM par
goto fail;
const size_t alloc_size = (size_t)length + 1ull;
BYTE* buf = calloc(alloc_size, sizeof(BYTE));
buf = calloc(alloc_size, sizeof(BYTE));
if (!buf)
goto fail;