Commit 135f5c7c authored by Habib Virji's avatar Habib Virji Committed by Randeep

Fix compilation issue in the security stack

- Some variable were left unused.
- ifdef was
- size_t being print with %d

Change-Id: I22524cd67a9cc4e1b8cd7844c2d81903b8084985
Signed-off-by: default avatarHabib Virji <habib.virji@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/12885Tested-by: default avatarjenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: default avatarKevin Kane <kkane@microsoft.com>
Reviewed-by: default avatarAshwini  Kumar <k.ashwini@samsung.com>
Reviewed-by: Randeep's avatarRandeep Singh <randeep.s@samsung.com>
(cherry picked from commit a875cebd)
Reviewed-on: https://gerrit.iotivity.org/gerrit/12883
parent 3c35d2d2
......@@ -159,7 +159,7 @@ size_t GetCredKeyDataSize(const OicSecCred_t* cred)
#endif
}
}
OIC_LOG_V(DEBUG, TAG, "Cred Key Data Size : %d\n", size);
OIC_LOG_V(DEBUG, TAG, "Cred Key Data Size : %zd\n", size);
return size;
}
......@@ -1676,7 +1676,6 @@ static OCEntityHandlerResult HandleGetRequest (const OCEntityHandlerRequest * eh
const OicSecCred_t *cred = gCred;
size_t credCnt = 0;
// This added '256' is arbitrary value that is added to cover the name of the resource, map addition and ending
size = GetCredKeyDataSize(cred);
size += (256 * OicSecCredCount(cred));
......@@ -2124,7 +2123,6 @@ OCStackResult SetCredRownerId(const OicUuid_t* newROwner)
memcpy(prevId.id, gCred->rownerID.id, sizeof(prevId.id));
memcpy(gCred->rownerID.id, newROwner->id, sizeof(newROwner->id));
size_t credCnt = 0;
// This added '256' is arbitrary value that is added to cover the name of the resource, map addition and ending
size = GetCredKeyDataSize(gCred);
size += (256 * OicSecCredCount(gCred));
......
......@@ -1210,7 +1210,7 @@ OCStackResult SetDoxmDeviceID(const OicUuid_t *deviceID)
//Check the device's OTM state
#ifdef __WITH_DTLS__}
#ifdef __WITH_DTLS__
//for normal device.
if(true == gDoxm->owned)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment