IOT-2539 Clean -Wunused-parameter simulator 89/22889/2
authorGeorge Nash <george.nash@intel.com>
Tue, 17 Oct 2017 22:22:54 +0000 (15:22 -0700)
committerUze Choi <uzchoi@samsung.com>
Thu, 19 Oct 2017 06:44:42 +0000 (06:44 +0000)
Remove the unused-parameter warning from the simulator code

Bug: https://jira.iotivity.org/browse/IOT-2539
Change-Id: Id1c3757e41443ae53126ac1ef1117e387f564327
Signed-off-by: George Nash <george.nash@intel.com>
service/simulator/examples/server/simulator_server.cpp
service/simulator/src/client/get_request_generator.cpp
service/simulator/src/client/post_request_generator.cpp
service/simulator/src/client/put_request_generator.cpp
service/simulator/src/client/request_sender.cpp
service/simulator/src/client/simulator_remote_resource_impl.cpp
service/simulator/src/server/simulator_collection_resource_impl.cpp
service/simulator/src/server/simulator_single_resource_impl.cpp

index baca8c0..7719c84 100644 (file)
@@ -477,7 +477,7 @@ void addInterface()
     resource->addInterface(OC_RSRVD_INTERFACE_ACTUATOR);
 }
 
-int main(int argc, char *argv[])
+int main()
 {
     printMainMenu();
     bool cont = true;
index 6e1e330..7a55517 100644 (file)
@@ -79,6 +79,9 @@ void GETRequestGenerator::SendAllRequests()
 void GETRequestGenerator::onResponseReceived(SimulatorResult result,
         const SimulatorResourceModel &repModel, const RequestInfo &reqInfo)
 {
+    OC_UNUSED(result);
+    OC_UNUSED(repModel);
+    OC_UNUSED(reqInfo);
     OIC_LOG(DEBUG, TAG, "Response recieved");
     m_responseCnt++;
     completed();
@@ -99,4 +102,4 @@ void GETRequestGenerator::completed()
             m_callback(m_id, OP_COMPLETE);
         }
     }
-}
\ No newline at end of file
+}
index cb27d47..2519502 100644 (file)
@@ -113,6 +113,9 @@ void POSTRequestGenerator::SendAllRequests()
 void POSTRequestGenerator::onResponseReceived(SimulatorResult result,
         const SimulatorResourceModel &repModel, const RequestInfo &reqInfo)
 {
+    OC_UNUSED(result);
+    OC_UNUSED(repModel);
+    OC_UNUSED(reqInfo);
     OIC_LOG(DEBUG, TAG, "Response recieved");
     m_responseCnt++;
     completed();
index 65ae77d..5971de9 100644 (file)
@@ -110,6 +110,9 @@ void PUTRequestGenerator::SendAllRequests()
 void PUTRequestGenerator::onResponseReceived(SimulatorResult result,
         const SimulatorResourceModel &repModel, const RequestInfo &reqInfo)
 {
+    OC_UNUSED(result);
+    OC_UNUSED(repModel);
+    OC_UNUSED(reqInfo);
     OIC_LOG(DEBUG, TAG, "Response recieved");
     m_responseCnt++;
     completed();
@@ -130,4 +133,4 @@ void PUTRequestGenerator::completed()
             m_callback(m_id, OP_COMPLETE);
         }
     }
-}
\ No newline at end of file
+}
index 4337a8d..04dfcf3 100644 (file)
@@ -54,6 +54,7 @@ void GETRequestSender::onResponseReceived(const OC::HeaderOptions &headerOptions
         const OC::OCRepresentation &rep, const int errorCode, RequestInfo &requestInfo,
         ResponseCallback callback)
 {
+    OC_UNUSED(headerOptions);
     SIM_LOG(ILogger::INFO, "Response received for GET." << "\n" << getPayloadString(rep));
     SimulatorResourceModel resourceModel = SimulatorResourceModel::build(rep);
     callback(static_cast<SimulatorResult>(errorCode), resourceModel, requestInfo);
@@ -92,6 +93,7 @@ void PUTRequestSender::onResponseReceived(const OC::HeaderOptions &headerOptions
         const OC::OCRepresentation &rep, const int errorCode, RequestInfo &requestInfo,
         ResponseCallback callback)
 {
+    OC_UNUSED(headerOptions);
     SIM_LOG(ILogger::INFO, "Response received for PUT." << "\n" << getPayloadString(rep));
     SimulatorResourceModel resourceModel = SimulatorResourceModel::build(rep);
     callback(static_cast<SimulatorResult>(errorCode), resourceModel, requestInfo);
@@ -130,6 +132,7 @@ void POSTRequestSender::onResponseReceived(const OC::HeaderOptions &headerOption
         const OC::OCRepresentation &rep, const int errorCode, RequestInfo &requestInfo,
         ResponseCallback callback)
 {
+    OC_UNUSED(headerOptions);
     SIM_LOG(ILogger::INFO, "Response received for POST." << "\n" << getPayloadString(rep));
     SimulatorResourceModel resourceModel = SimulatorResourceModel::build(rep);
     callback(static_cast<SimulatorResult>(errorCode), resourceModel, requestInfo);
index 221d609..d7817b1 100644 (file)
@@ -139,6 +139,7 @@ void SimulatorRemoteResourceImpl::observe(ObserveType type,
             [](const OC::HeaderOptions & headerOptions, const OC::OCRepresentation & ocRep,
                const int errorCode, const int sqNum, std::string id, ObserveNotificationCallback callback)
     {
+        OC_UNUSED(headerOptions);
         SIM_LOG(ILogger::INFO, "Response received for OBSERVE request."
                 << "\n" << getPayloadString(ocRep))
 
@@ -462,6 +463,7 @@ void SimulatorRemoteResourceImpl::onResponseReceived(SimulatorResult result,
         const SimulatorResourceModel &resourceModel, const RequestInfo &reqInfo,
         ResponseCallback callback)
 {
+    OC_UNUSED(reqInfo);
     callback(m_id, result, resourceModel);
 }
 
index 5524618..c1210cf 100644 (file)
@@ -661,6 +661,7 @@ OCEntityHandlerResult SimulatorCollectionResourceImpl::sendResponse(
     const std::shared_ptr<OC::OCResourceRequest> &request, const int errorCode,
     OCEntityHandlerResult responseResult)
 {
+    OC_UNUSED(errorCode);
     std::shared_ptr<OC::OCResourceResponse> response(new OC::OCResourceResponse());
     response->setRequestHandle(request->getRequestHandle());
     response->setResourceHandle(request->getResourceHandle());
index c783ec3..211de50 100644 (file)
@@ -954,6 +954,7 @@ OCEntityHandlerResult SimulatorSingleResourceImpl::sendResponse(
     const std::shared_ptr<OC::OCResourceRequest> &request, const int errorCode,
     OCEntityHandlerResult responseResult)
 {
+    OC_UNUSED(errorCode);
     std::shared_ptr<OC::OCResourceResponse> response(new OC::OCResourceResponse());
     response->setRequestHandle(request->getRequestHandle());
     response->setResourceHandle(request->getResourceHandle());
@@ -976,6 +977,7 @@ OCEntityHandlerResult SimulatorSingleResourceImpl::sendResponse(
     OCEntityHandlerResult responseResult, OC::OCRepresentation &payload,
     const std::string &interfaceType)
 {
+    OC_UNUSED(errorCode);
     std::shared_ptr<OC::OCResourceResponse> response(new OC::OCResourceResponse());
     response->setRequestHandle(request->getRequestHandle());
     response->setResourceHandle(request->getResourceHandle());