Fixed missing initialization warnings.
authorArmin Novak <armin.novak@thincast.com>
Thu, 21 Dec 2017 10:04:32 +0000 (11:04 +0100)
committerArmin Novak <armin.novak@thincast.com>
Thu, 21 Dec 2017 10:04:32 +0000 (11:04 +0100)
libfreerdp/core/nla.c
libfreerdp/primitives/prim_YUV.c

index fefe1d0..458ddff 100644 (file)
@@ -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;
 
index 0e2b4b0..1adb18c 100644 (file)
@@ -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;