From 3ff9df7ce667910ad3f12953274d0236a0f39183 Mon Sep 17 00:00:00 2001 From: KIM JungYong Date: Fri, 9 Sep 2016 13:21:04 +0900 Subject: [PATCH] Fix for result of static analysis. Pointer value casting is fixed for valid size. If statement is fixed. Change-Id: I4e6304769c683f78caca8eea4f4dc1da5c369a59 Signed-off-by: KIM JungYong Reviewed-on: https://gerrit.iotivity.org/gerrit/11619 Reviewed-by: Uze Choi Tested-by: jenkins-iotivity Reviewed-by: Hun-je Yeon --- service/notification/src/consumer/NSConsumerDiscovery.c | 4 ++-- service/notification/unittest/NSProviderSimulator.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/service/notification/src/consumer/NSConsumerDiscovery.c b/service/notification/src/consumer/NSConsumerDiscovery.c index 98951b34f..44c6a1962 100644 --- a/service/notification/src/consumer/NSConsumerDiscovery.c +++ b/service/notification/src/consumer/NSConsumerDiscovery.c @@ -211,7 +211,7 @@ NSProvider_internal * NSGetProvider(OCClientResponse * clientResponse) char * syncUri = NULL; char * topicUri = NULL; bool bAccepter = 0; - int16_t iAccepter = 0; + int64_t iAccepter = 0; NSProviderConnectionInfo * connection = NULL; NS_LOG(DEBUG, "get information of accepter"); @@ -222,7 +222,7 @@ NSProvider_internal * NSGetProvider(OCClientResponse * clientResponse) } else if (accepterType == OCREP_PROP_INT) { - getResult = OCRepPayloadGetPropInt(payload, NS_ATTRIBUTE_POLICY, (int64_t*) & iAccepter); + getResult = OCRepPayloadGetPropInt(payload, NS_ATTRIBUTE_POLICY, & iAccepter); } NS_VERIFY_NOT_NULL(getResult == true ? (void *) 1 : NULL, NULL); diff --git a/service/notification/unittest/NSProviderSimulator.h b/service/notification/unittest/NSProviderSimulator.h index bdc44e39c..953e58d14 100644 --- a/service/notification/unittest/NSProviderSimulator.h +++ b/service/notification/unittest/NSProviderSimulator.h @@ -176,7 +176,7 @@ private: return response; } - else if (request == "POST" && type == requestType::NS_SYNC) + else if (request == "POST") { if (type == requestType::NS_SYNC) { -- 2.34.1