From e4766c656e5bfbc804ac56770299921cf3d9d84d Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Thu, 21 Dec 2017 11:04:32 +0100 Subject: [PATCH] Fixed missing initialization warnings. --- libfreerdp/core/nla.c | 16 ++++++++-------- libfreerdp/primitives/prim_YUV.c | 16 ++++++++++++++-- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/libfreerdp/core/nla.c b/libfreerdp/core/nla.c index fefe1d045..458ddffa4 100644 --- a/libfreerdp/core/nla.c +++ b/libfreerdp/core/nla.c @@ -162,7 +162,7 @@ static int nla_client_init(rdpNla* nla) if ((!settings->Username) || (!strlen(settings->Username)) || (((!settings->Password) || (!strlen(settings->Password))) - && (!settings->RedirectionPassword))) + && (!settings->RedirectionPassword))) { PromptPassword = TRUE; } @@ -227,14 +227,14 @@ static int nla_client_init(rdpNla* nla) if (settings->RedirectionPassword && settings->RedirectionPasswordLength > 0) { if (sspi_SetAuthIdentityWithUnicodePassword(nla->identity, settings->Username, settings->Domain, - (UINT16*) settings->RedirectionPassword, - settings->RedirectionPasswordLength / sizeof(WCHAR) - 1) < 0) + (UINT16*) settings->RedirectionPassword, + settings->RedirectionPasswordLength / sizeof(WCHAR) - 1) < 0) return -1; } else { if (sspi_SetAuthIdentity(nla->identity, settings->Username, settings->Domain, - settings->Password) < 0) + settings->Password) < 0) return -1; } } @@ -1021,7 +1021,7 @@ static void ap_integer_decrement_le(BYTE* number, int size) SECURITY_STATUS nla_encrypt_public_key_echo(rdpNla* nla) { - SecBuffer Buffers[2] = { 0 }; + SecBuffer Buffers[2] = { { 0 } }; SecBufferDesc Message; SECURITY_STATUS status; int public_key_length; @@ -1079,7 +1079,7 @@ SECURITY_STATUS nla_decrypt_public_key_echo(rdpNla* nla) BYTE* public_key2 = NULL; int public_key_length = 0; int signature_length; - SecBuffer Buffers[2] = { 0 }; + SecBuffer Buffers[2] = { { 0 } }; SecBufferDesc Message; SECURITY_STATUS status; signature_length = nla->pubKeyAuth.cbBuffer - nla->PublicKey.cbBuffer; @@ -1425,7 +1425,7 @@ static BOOL nla_encode_ts_credentials(rdpNla* nla) static SECURITY_STATUS nla_encrypt_ts_credentials(rdpNla* nla) { - SecBuffer Buffers[2] = { 0 }; + SecBuffer Buffers[2] = { { 0 } }; SecBufferDesc Message; SECURITY_STATUS status; @@ -1479,7 +1479,7 @@ static SECURITY_STATUS nla_decrypt_ts_credentials(rdpNla* nla) int length; BYTE* buffer; ULONG pfQOP; - SecBuffer Buffers[2] = { 0 }; + SecBuffer Buffers[2] = { { 0 } }; SecBufferDesc Message; SECURITY_STATUS status; diff --git a/libfreerdp/primitives/prim_YUV.c b/libfreerdp/primitives/prim_YUV.c index 0e2b4b05e..1adb18ce3 100644 --- a/libfreerdp/primitives/prim_YUV.c +++ b/libfreerdp/primitives/prim_YUV.c @@ -830,7 +830,13 @@ static INLINE pstatus_t general_RGBToAVC444YUV_BGRX( */ UINT32 x, y, n, numRows, numCols; BOOL evenRow = TRUE; - BYTE* b1, *b2, *b3, *b4, *b5, *b6, *b7; + BYTE* b1 = NULL; + BYTE* b2 = NULL; + BYTE* b3 = NULL; + BYTE* b4 = NULL; + BYTE* b5 = NULL; + BYTE* b6 = NULL; + BYTE* b7 = NULL; const BYTE* pMaxSrc = pSrc + (roi->height - 1) * srcStep; numRows = (roi->height + 1) & ~1; numCols = (roi->width + 1) & ~1; @@ -965,7 +971,13 @@ static INLINE pstatus_t general_RGBToAVC444YUV_ANY( const UINT32 bpp = GetBytesPerPixel(srcFormat); UINT32 x, y, n, numRows, numCols; BOOL evenRow = TRUE; - BYTE* b1, *b2, *b3, *b4, *b5, *b6, *b7; + BYTE* b1 = NULL; + BYTE* b2 = NULL; + BYTE* b3 = NULL; + BYTE* b4 = NULL; + BYTE* b5 = NULL; + BYTE* b6 = NULL; + BYTE* b7 = NULL; const BYTE* pMaxSrc = pSrc + (roi->height - 1) * srcStep; numRows = (roi->height + 1) & ~1; numCols = (roi->width + 1) & ~1;