Commit d3af39f0 authored by Dan Mihai's avatar Dan Mihai

Fix cloud\aclid.c build break

aclid.c
cacommonutil.h(40): error C2220: warning treated as error -
no 'object' filegenerated
cacommonutil.h(40): warning C4005: 'VERIFY_TRUE': macro redefinition
srmutility.h(72): note: see previous definition of 'VERIFY_TRUE'

Change-Id: Ic629cc9fc5ed074032d9a0a455d9ae4be7312142
Signed-off-by: default avatarDan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19085Reviewed-by: default avatarKevin Kane <kkane@microsoft.com>
Reviewed-by: default avatarOmar Maabreh <omarm@microsoft.com>
Reviewed-by: default avatarGreg Zaverucha <gregz@microsoft.com>
Reviewed-by: default avatarMike Fenelon <mike.fenelon@microsoft.com>
Tested-by: default avatarjenkins-iotivity <jenkins@iotivity.org>
parent ee12046d
......@@ -64,10 +64,10 @@ struct OicParseQueryIter
/**
* Macro to verify expression evaluates to bool true.
* eg: VERIFY_TRUE(TAG, OC_STACK_OK == foo(), ERROR);
* eg: VERIFY_TRUE_OR_EXIT(TAG, OC_STACK_OK == foo(), ERROR);
* @note Invoking function must define "exit:" label for goto functionality to work correctly.
*/
#define VERIFY_TRUE(tag, op, logLevel) do{ if (!(op)) \
#define VERIFY_TRUE_OR_EXIT(tag, op, logLevel) do{ if (!(op)) \
{OIC_LOG_V((logLevel), tag, "%s:" #op "evaluates to false!",__func__); \
goto exit; } }while(0)
......
......@@ -98,35 +98,35 @@ static bool IsReadyToEnterRFNOP()
// Verify doxm.owned == TRUE.
VERIFY_SUCCESS(TAG, OC_STACK_OK == GetDoxmIsOwned(&tempBool), ERROR);
VERIFY_TRUE(TAG, tempBool, WARNING);
VERIFY_TRUE_OR_EXIT(TAG, tempBool, WARNING);
// Verify doxm.devowneruuid != nil UUID.
VERIFY_SUCCESS(TAG, OC_STACK_OK == GetDoxmDevOwnerId(&tempUuid), ERROR);
VERIFY_TRUE(TAG, !IsNilUuid(&tempUuid), WARNING);
VERIFY_TRUE_OR_EXIT(TAG, !IsNilUuid(&tempUuid), WARNING);
// Verify doxm.deviceuuid != nil UUID.
VERIFY_SUCCESS(TAG, OC_STACK_OK == GetDoxmDeviceID(&tempUuid), ERROR);
VERIFY_TRUE(TAG, !IsNilUuid(&tempUuid), WARNING);
VERIFY_TRUE_OR_EXIT(TAG, !IsNilUuid(&tempUuid), WARNING);
// Verify oxmsel was the actual OTM used (no-op: CTT will verify this during
// certification testing, as it requires OBT cooperation to verify).
// Verify pstat.isop == false (Server sets isop on entry)
VERIFY_SUCCESS(TAG, OC_STACK_OK == GetPstatIsop(&tempBool), ERROR);
VERIFY_TRUE(TAG, !tempBool, WARNING);
VERIFY_TRUE_OR_EXIT(TAG, !tempBool, WARNING);
// Verify implemented SVRs with rowneruuid Property have non-Nil rowneruuid
VERIFY_SUCCESS(TAG, OC_STACK_OK == GetAclRownerId(&tempUuid), ERROR);
VERIFY_TRUE(TAG, !IsNilUuid(&tempUuid), WARNING);
VERIFY_TRUE_OR_EXIT(TAG, !IsNilUuid(&tempUuid), WARNING);
VERIFY_SUCCESS(TAG, OC_STACK_OK == GetCredRownerId(&tempUuid), ERROR);
VERIFY_TRUE(TAG, !IsNilUuid(&tempUuid), WARNING);
VERIFY_TRUE_OR_EXIT(TAG, !IsNilUuid(&tempUuid), WARNING);
VERIFY_SUCCESS(TAG, OC_STACK_OK == GetDoxmRownerId(&tempUuid), ERROR);
VERIFY_TRUE(TAG, !IsNilUuid(&tempUuid), WARNING);
VERIFY_TRUE_OR_EXIT(TAG, !IsNilUuid(&tempUuid), WARNING);
VERIFY_SUCCESS(TAG, OC_STACK_OK == GetPstatRownerId(&tempUuid), ERROR);
VERIFY_TRUE(TAG, !IsNilUuid(&tempUuid), WARNING);
VERIFY_TRUE_OR_EXIT(TAG, !IsNilUuid(&tempUuid), WARNING);
// Verify each rowneruuid, devowneruuid has a corresponding /cred entry
// TODO [IOT-2023]
......@@ -151,11 +151,11 @@ static bool IsReadyToEnterRFOTM()
// Verify doxm.owned == FALSE.
VERIFY_SUCCESS(TAG, OC_STACK_OK == GetDoxmIsOwned(&tempBool), ERROR);
VERIFY_TRUE(TAG, !tempBool, WARNING);
VERIFY_TRUE_OR_EXIT(TAG, !tempBool, WARNING);
// Verify doxm.devowneruuid == nil UUID.
VERIFY_SUCCESS(TAG, OC_STACK_OK == GetDoxmDevOwnerId(&tempUuid), ERROR);
VERIFY_TRUE(TAG, !IsNilUuid(&tempUuid), WARNING);
VERIFY_TRUE_OR_EXIT(TAG, !IsNilUuid(&tempUuid), WARNING);
// Check and log whether doxm.deviceuuid == nil UUID ("may" reqt not "shall")
VERIFY_SUCCESS(TAG, OC_STACK_OK == GetDoxmDeviceID(&tempUuid), ERROR);
......@@ -185,30 +185,30 @@ static bool IsReadyToEnterRFPRO()
// Verify doxm.owned == TRUE.
VERIFY_SUCCESS(TAG, OC_STACK_OK == GetDoxmIsOwned(&tempBool), ERROR);
VERIFY_TRUE(TAG, tempBool, WARNING);
VERIFY_TRUE_OR_EXIT(TAG, tempBool, WARNING);
// Verify doxm.devowneruuid != nil UUID.
VERIFY_SUCCESS(TAG, OC_STACK_OK == GetDoxmDevOwnerId(&tempUuid), ERROR);
VERIFY_TRUE(TAG, !IsNilUuid(&tempUuid), WARNING);
VERIFY_TRUE_OR_EXIT(TAG, !IsNilUuid(&tempUuid), WARNING);
// Verify doxm.deviceuuid != nil UUID.
VERIFY_SUCCESS(TAG, OC_STACK_OK == GetDoxmDeviceID(&tempUuid), ERROR);
VERIFY_TRUE(TAG, !IsNilUuid(&tempUuid), WARNING);
VERIFY_TRUE_OR_EXIT(TAG, !IsNilUuid(&tempUuid), WARNING);
// doxm.sct and doxm.oxmsel retain previous values (checked by CTT)
// Verify implemented SVRs with rowneruuid Property have non-Nil rowneruuid
VERIFY_SUCCESS(TAG, OC_STACK_OK == GetAclRownerId(&tempUuid), ERROR);
VERIFY_TRUE(TAG, !IsNilUuid(&tempUuid), WARNING);
VERIFY_TRUE_OR_EXIT(TAG, !IsNilUuid(&tempUuid), WARNING);
VERIFY_SUCCESS(TAG, OC_STACK_OK == GetCredRownerId(&tempUuid), ERROR);
VERIFY_TRUE(TAG, !IsNilUuid(&tempUuid), WARNING);
VERIFY_TRUE_OR_EXIT(TAG, !IsNilUuid(&tempUuid), WARNING);
VERIFY_SUCCESS(TAG, OC_STACK_OK == GetDoxmRownerId(&tempUuid), ERROR);
VERIFY_TRUE(TAG, !IsNilUuid(&tempUuid), WARNING);
VERIFY_TRUE_OR_EXIT(TAG, !IsNilUuid(&tempUuid), WARNING);
VERIFY_SUCCESS(TAG, OC_STACK_OK == GetPstatRownerId(&tempUuid), ERROR);
VERIFY_TRUE(TAG, !IsNilUuid(&tempUuid), WARNING);
VERIFY_TRUE_OR_EXIT(TAG, !IsNilUuid(&tempUuid), WARNING);
// Verify each rowneruuid, devowneruuid has a corresponding /cred entry
// TODO [IOT-2023]
......@@ -235,15 +235,15 @@ static bool IsReadyToEnterSRESET()
// Verify doxm.owned == TRUE.
VERIFY_SUCCESS(TAG, OC_STACK_OK == GetDoxmIsOwned(&tempBool), ERROR);
VERIFY_TRUE(TAG, tempBool, WARNING);
VERIFY_TRUE_OR_EXIT(TAG, tempBool, WARNING);
// Verify doxm.devowneruuid != nil UUID.
VERIFY_SUCCESS(TAG, OC_STACK_OK == GetDoxmDevOwnerId(&tempUuid), ERROR);
VERIFY_TRUE(TAG, !IsNilUuid(&tempUuid), WARNING);
VERIFY_TRUE_OR_EXIT(TAG, !IsNilUuid(&tempUuid), WARNING);
// Verify doxm.deviceuuid != nil UUID.
VERIFY_SUCCESS(TAG, OC_STACK_OK == GetDoxmDeviceID(&tempUuid), ERROR);
VERIFY_TRUE(TAG, !IsNilUuid(&tempUuid), WARNING);
VERIFY_TRUE_OR_EXIT(TAG, !IsNilUuid(&tempUuid), WARNING);
// doxm.sct and doxm.oxmsel retain previous values (checked by CTT)
......
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