From 44bcb3c15ddc6320f8be2868db4ef95837943694 Mon Sep 17 00:00:00 2001 From: Habib Virji Date: Mon, 12 Oct 2015 16:43:13 +0100 Subject: [PATCH] Fix compilation issue in security module Fixed types used for OIC_LOG_V were not correct. Fixed tmp variables used under the flag to be declared under the flag. Change-Id: I78a38d7fa89d56b7c350b2144c9916e55dff9c10 Signed-off-by: Habib Virji Reviewed-on: https://gerrit.iotivity.org/gerrit/3819 Tested-by: jenkins-iotivity Reviewed-by: Sachin Agrawal --- resource/csdk/security/src/doxmresource.c | 2 ++ resource/csdk/security/src/psinterface.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/resource/csdk/security/src/doxmresource.c b/resource/csdk/security/src/doxmresource.c index cb2bd37..6acb7e3 100644 --- a/resource/csdk/security/src/doxmresource.c +++ b/resource/csdk/security/src/doxmresource.c @@ -596,9 +596,11 @@ static OCEntityHandlerResult HandleDoxmPutRequest (const OCEntityHandlerRequest } else if(OIC_RANDOM_DEVICE_PIN == newDoxm->oxmSel) { +#ifdef __WITH_DTLS__ //this temp Credential ID is used to track temporal Cred Id static OicUuid_t tmpCredId = {.id={0}}; static bool tmpCredGenFlag = false; +#endif //__WITH_DTLS__ if ((false == gDoxm->owned) && (false == newDoxm->owned)) { diff --git a/resource/csdk/security/src/psinterface.c b/resource/csdk/security/src/psinterface.c index 992fe70..391c62f 100644 --- a/resource/csdk/security/src/psinterface.c +++ b/resource/csdk/security/src/psinterface.c @@ -96,7 +96,7 @@ char * GetSVRDatabase() size_t bytesRead = ps->read(jsonStr, 1, size, fp); jsonStr[bytesRead] = '\0'; - OC_LOG_V(DEBUG, TAG, "Read %d bytes from SVR database file", bytesRead); + OC_LOG_V(DEBUG, TAG, "Read %zu bytes from SVR database file", bytesRead); ps->close(fp); fp = NULL; } @@ -190,7 +190,7 @@ OCStackResult UpdateSVRDatabase(const char* rsrcName, cJSON* jsonObj) { ret = OC_STACK_OK; } - OC_LOG_V(DEBUG, TAG, "Written %d bytes into SVR database file", bytesWritten); + OC_LOG_V(DEBUG, TAG, "Written %zu bytes into SVR database file", bytesWritten); ps->close(fp); fp = NULL; } -- 2.7.4