From: leechul Date: Fri, 11 Mar 2016 04:21:27 +0000 (+0900) Subject: Remove the compile errors for arduino. X-Git-Tag: 1.2.0+RC1~550 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=480de02aaaffeb8039760992c72805b08b9f09a9;p=platform%2Fupstream%2Fiotivity.git Remove the compile errors for arduino. If we use 'goto' on arduino. We should initialize variable before the 'goto'. Change-Id: I06bc47dcfece26ad5d5bde7e71e0f57473310d5a Signed-off-by: leechul Reviewed-on: https://gerrit.iotivity.org/gerrit/5705 Reviewed-by: dongik Lee Reviewed-by: Randeep Singh Tested-by: Randeep Singh (cherry picked from commit e432aeff0031f9852e2031e018957c350c938d54) Reviewed-on: https://gerrit.iotivity.org/gerrit/5743 --- diff --git a/resource/csdk/security/src/aclresource.c b/resource/csdk/security/src/aclresource.c index 47f81ee..e142ca7 100644 --- a/resource/csdk/security/src/aclresource.c +++ b/resource/csdk/security/src/aclresource.c @@ -1029,7 +1029,8 @@ static OicSecAcl_t* GetSecDefaultACL() OIC_RSRC_DOXM_URI, OIC_RSRC_PSTAT_URI }; - + OicUuid_t ownerId = {.id = {0}}; + OCStackResult res = OC_STACK_ERROR; OicSecAcl_t* newDefaultAcl = (OicSecAcl_t*)OICCalloc(1, sizeof(OicSecAcl_t)); VERIFY_NON_NULL(TAG, newDefaultAcl, ERROR); @@ -1060,8 +1061,7 @@ static OicSecAcl_t* GetSecDefaultACL() newDefaultAcl->recurrences = NULL; // Device ID is the owner of this default ACL - OicUuid_t ownerId = {.id = {0}}; - OCStackResult res = GetDoxmDeviceID(&ownerId); + res = GetDoxmDeviceID(&ownerId); VERIFY_SUCCESS(TAG, OC_STACK_OK == res, FATAL); // Owners -- Mandatory