build for gcc-9.2 fixed 86/29786/3
authorOleksandr Dmytrenko <o.dmytrenko@samsung.com>
Wed, 25 Sep 2019 11:26:59 +0000 (14:26 +0300)
committerAleksey Volkov <a.volkov@samsung.com>
Fri, 8 Nov 2019 16:57:24 +0000 (16:57 +0000)
error: jump to label 'exit'
note:   crosses initialization of 'CAResult_t pskRet'
note:   crosses initialization of 'uint8_t subOwnerPSK [16]'

Change-Id: I23ae74e23a15da103d82994bd98e419f71540ea7
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
resource/csdk/security/src/credresource.c

index 337aab3..ab4b094 100644 (file)
@@ -2177,12 +2177,13 @@ static bool FillPrivateDataOfSubOwnerPSK(OicSecCred_t* receivedCred, const CAEnd
                            const OicSecDoxm_t* doxm, const OicUuid_t* subOwner)
 {
     unsigned char* b64Buf = NULL;
+    uint8_t subOwnerPSK[OWNER_PSK_LENGTH_128] = {0};
+    CAResult_t pskRet = CA_STATUS_OK;
     //Derive OwnerPSK locally
     const char* oxmLabel = GetOxmString(doxm->oxmSel);
     VERIFY_NOT_NULL(TAG, oxmLabel, ERROR);
 
-    uint8_t subOwnerPSK[OWNER_PSK_LENGTH_128] = {0};
-    CAResult_t pskRet = CAGenerateOwnerPSK(ownerAddr,
+    pskRet = CAGenerateOwnerPSK(ownerAddr,
         (uint8_t*)oxmLabel, strlen(oxmLabel),
         subOwner->id, sizeof(subOwner->id),
         doxm->deviceID.id, sizeof(doxm->deviceID.id),