- Modify unused parameter.
- Removed 'const' return type which is not required
- Removed meaningless prameter naming.
Change-Id: I4ff3d86ca7586f98893a486bd059e631d77d7fc9
Signed-off-by: doil.kwon <doil.kwon@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/2054
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Madan Lanka <lanka.madan@samsung.com>
static ResourceBroker * getInstance();
- const BrokerID hostResource(PrimitiveResourcePtr pResource, BrokerCB cb);
+ BrokerID hostResource(PrimitiveResourcePtr pResource, BrokerCB cb);
void cancelHostResource(BrokerID brokerId);
BROKER_STATE getResourceState(BrokerID brokerId);
}
void DevicePresence::subscribeCB(OCStackResult ret,
- const unsigned int seq, const std::string& hostAddress)
+ const unsigned int seq, const std::string & hostAddress)
{
OC_LOG_V(DEBUG, BROKER_TAG, "subscribeCB()");
OC_LOG_V(DEBUG, BROKER_TAG, "Received presence CB from: %s",hostAddress.c_str());
}
}
- void DevicePresence::timeOutCB(TimerID id)
+ void DevicePresence::timeOutCB(TimerID /*id*/)
{
OC_LOG_V(DEBUG,BROKER_TAG,"timeOutCB()");
std::unique_lock<std::mutex> lock(timeoutMutex);
return s_instance;
}
- const BrokerID ResourceBroker::hostResource(PrimitiveResourcePtr pResource, BrokerCB cb)
+ BrokerID ResourceBroker::hostResource(PrimitiveResourcePtr pResource, BrokerCB cb)
{
OC_LOG_V(DEBUG, BROKER_TAG, "hostResource().");
if(pResource == nullptr || cb == nullptr || cb == NULL)
this->state = _state;
}
- void ResourcePresence::timeOutCB(unsigned int msg)
+ void ResourcePresence::timeOutCB(unsigned int /*msg*/)
{
OC_LOG_V(DEBUG, BROKER_TAG, "timeOutCB()");
OC_LOG_V(DEBUG, BROKER_TAG, "waiting for terminate getCB\n");
pollingCB();
}
- void ResourcePresence::pollingCB(unsigned int msg)
+ void ResourcePresence::pollingCB(unsigned int /*msg*/)
{
OC_LOG_V(DEBUG, BROKER_TAG, "pollingCB().\n");
if(this->requesterList->size() != 0)
}
}
- void ResourcePresence::getCB(const HeaderOptions &hos,
- const ResponseStatement& rep, int eCode)
+ void ResourcePresence::getCB(const HeaderOptions & /*hos*/,
+ const ResponseStatement & /*rep*/, int eCode)
{
OC_LOG_V(DEBUG, BROKER_TAG, "getCB().\n");
OC_LOG_V(DEBUG, BROKER_TAG, "waiting for terminate TimeoutCB.\n");
void MockingFunc()
{
- mocks.OnCall(pResource.get(), PrimitiveResource::requestGet).Do([](GetCallback cb){});
+ mocks.OnCall(pResource.get(), PrimitiveResource::requestGet).Do([](GetCallback){});
mocks.OnCall(pResource.get(), PrimitiveResource::getHost).Return(std::string());
mocks.OnCallFuncOverload(static_cast< subscribePresenceSig1 >(OC::OCPlatform::subscribePresence)).Return(OC_STACK_OK);
}
});
mocks.OnCall(pResource.get(), PrimitiveResource::requestGet).Do(
- [](GetCallback callback){
+ [](GetCallback){
std::cout <<"End call requestGetFunc()\n";
});
mocks.OnCall(pResource.get(), PrimitiveResource::getHost).Return("address1");