IOT-2539 Cleanup warnings from subownerclient.cpp 77/22177/2
authorGeorge Nash <george.nash@intel.com>
Fri, 4 Aug 2017 21:01:52 +0000 (14:01 -0700)
committerRandeep Singh <randeep.s@samsung.com>
Mon, 4 Sep 2017 04:48:57 +0000 (04:48 +0000)
Used the OC_UNUSED macro for unused parameters in callback
functions.

Deleted unused variables.

Bug: https://jira.iotivity.org/browse/IOT-2539
Change-Id: I5b1ad8bb52622217fc3a4ab11ff18b3e8f1376d9
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21757
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
(cherry picked from commit 7d7389be01703751816bc0b21f21ac6bd18fc711)
Reviewed-on: https://gerrit.iotivity.org/gerrit/22177

resource/provisioning/examples/subownerclient.cpp

index cf6f036..2c9ea8e 100644 (file)
@@ -94,6 +94,8 @@ void moveTransferredDevice()
 
 void OnInputPinCB(OicUuid_t deviceId, char* pinBuf, size_t bufSize)
 {
+    OC_UNUSED(deviceId);
+
     if(pinBuf)
     {
         std::cout <<"INPUT PIN : ";
@@ -178,6 +180,8 @@ static void getCallback(const HeaderOptions& headerOptions, const OCRepresentati
 
 void putCallback(const HeaderOptions& /*headerOptions*/, const OCRepresentation& rep, const int eCode)
 {
+    OC_UNUSED(rep);
+
     if(eCode == 0)
     {
         std::cout << "PUT request was successful !!!!!!" << std::endl;
@@ -215,7 +219,6 @@ int main(void)
     try
     {
         int choice;
-        OicSecAcl_t *acl1 = nullptr, *acl2 = nullptr;
         if (OCSecure::provisionInit("") != OC_STACK_OK)
         {
             std::cout <<"PM Init failed"<< std::endl;