[Resource Encapsulation] Resolved build warning.
authordoil.kwon <doil.kwon@samsung.com>
Mon, 3 Aug 2015 06:03:19 +0000 (15:03 +0900)
committerMadan Lanka <lanka.madan@samsung.com>
Mon, 3 Aug 2015 13:23:11 +0000 (13:23 +0000)
- 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>
service/resource-encapsulation/src/resourceBroker/include/ResourceBroker.h
service/resource-encapsulation/src/resourceBroker/src/DevicePresence.cpp
service/resource-encapsulation/src/resourceBroker/src/ResourceBroker.cpp
service/resource-encapsulation/src/resourceBroker/src/ResourcePresence.cpp
service/resource-encapsulation/src/resourceBroker/unittest/ResourcePresenceUnitTest.cpp

index 5d9aad7..56e2545 100644 (file)
@@ -53,7 +53,7 @@ namespace OIC
 
             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);
index 6374621..629ef14 100644 (file)
@@ -110,7 +110,7 @@ namespace OIC
         }
 
         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());
@@ -160,7 +160,7 @@ namespace OIC
             }
         }
 
-        void DevicePresence::timeOutCB(TimerID id)
+        void DevicePresence::timeOutCB(TimerID /*id*/)
         {
             OC_LOG_V(DEBUG,BROKER_TAG,"timeOutCB()");
             std::unique_lock<std::mutex> lock(timeoutMutex);
index b82c1ba..0332bcd 100644 (file)
@@ -63,7 +63,7 @@ namespace OIC
             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)
index 257a577..e6ab0ef 100644 (file)
@@ -208,7 +208,7 @@ namespace OIC
             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");
@@ -232,7 +232,7 @@ namespace OIC
             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)
@@ -242,8 +242,8 @@ namespace OIC
             }
         }
 
-        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");
index 6c07f58..31ca22e 100644 (file)
@@ -75,7 +75,7 @@ protected:
 
     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);
     }
@@ -229,7 +229,7 @@ TEST_F(ResourcePresenceTest,getCB_NormalHandlingIfMessageOC_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");