Commit 29293875 authored by Alex Kelley's avatar Alex Kelley Committed by Kevin Kane

[IOT-1888] Fix /W4 warnings present when building with -noSecurity or -release

Change-Id: I70ff36b675418f7e441b1af594d922c231430918
Signed-off-by: default avatarAlex Kelley <alexke@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17755Reviewed-by: default avatarKevin Kane <kkane@microsoft.com>
Tested-by: default avatarjenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: default avatarDan Mihai <Daniel.Mihai@microsoft.com>
parent 7ffc0239
......@@ -18,7 +18,9 @@ if env['CC'] == 'cl':
# - Disabled due to IoTivity not being ANSI compatible
# - warning C4214: bit field types other than int
# - Disabled due to IoTivity not being ANSI compatible
env.AppendUnique(CCFLAGS=['/wd4127', '/wd4200', '/wd4201', '/wd4214'])
# - warning C4706: assignment within conditional expression
# - Disabled due to the widespread usage in IoTivity and low impact.
env.AppendUnique(CCFLAGS=['/wd4127', '/wd4200', '/wd4201', '/wd4214', '/wd4706'])
env.AppendUnique(CCFLAGS=['/EHsc'])
......
......@@ -117,11 +117,12 @@ static bool ValueWithinBounds(uint64_t value, uint64_t maxValue)
static bool CheckSubjectOfCertificate(OicSecCred_t* cred, OicUuid_t deviceID)
{
OicUuid_t emptyUuid = {.id={0}};
OIC_LOG(DEBUG, TAG, "IN CheckSubjectOfCertificate");
VERIFY_NOT_NULL(TAG, cred, ERROR);
#if defined(__WITH_DTLS__) || defined(__WITH_TLS__)
const OicUuid_t emptyUuid = { .id = { 0 } };
if ( SIGNED_ASYMMETRIC_KEY == cred->credType)
{
if((0 == memcmp(cred->subject.id, emptyUuid.id, sizeof(cred->subject.id))) ||
......@@ -130,6 +131,8 @@ static bool CheckSubjectOfCertificate(OicSecCred_t* cred, OicUuid_t deviceID)
memcpy(cred->subject.id, deviceID.id, sizeof(deviceID.id));
}
}
#else
OC_UNUSED(deviceID);
#endif
OIC_LOG(DEBUG, TAG, "OUT CheckSubjectOfCertificate");
......
......@@ -145,6 +145,8 @@ static bool IsRequestFromOwnershipTransferSession(SRMRequestContext_t *context)
OIC_LOG_V(DEBUG, TAG, "%s: request was %sreceived from Ownership Transfer session",
__func__, retVal ? "" : "NOT ");
}
#else
OC_UNUSED(context);
#endif
return retVal;
......
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