Fix C++ unit test build warnings
authorSakthivel Samidurai <sakthivel.samidurai@intel.com>
Tue, 25 Aug 2015 23:04:01 +0000 (16:04 -0700)
committerJon A. Cruz <jonc@osg.samsung.com>
Wed, 26 Aug 2015 06:08:12 +0000 (06:08 +0000)
Change-Id: Ic018b9d6fda988031761ba23b43d8a93231e00f4
Signed-off-by: Sakthivel Samidurai <sakthivel.samidurai@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/2275
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
resource/unittests/OCPlatformTest.cpp

index f526585..ec8d14e 100644 (file)
@@ -33,27 +33,27 @@ namespace OCPlatformTest
     OCResourceHandle resourceHandle;
   //OCPersistent Storage Handlers
 
-   static FILE* client_open(const char *path, const char *mode)
+   static FILE* client_open(const char* /*path*/, const char *mode)
    {
        std::cout << "<===Opening SVR DB file = './oic_svr_db_client.json' with mode = '"<< mode<<"' "<<std::endl;
                return fopen("./oic_svr_db_client.json", mode);
    }
     // Callbacks
-    OCEntityHandlerResult entityHandler(std::shared_ptr<OCResourceRequest> request)
+    OCEntityHandlerResult entityHandler(std::shared_ptr<OCResourceRequest> /*request*/)
     {
         return OC_EH_OK;
     }
 
-    void foundResource(std::shared_ptr<OCResource> resource)
+    void foundResource(std::shared_ptr<OCResource> /*resource*/)
     {
     }
 
-    void receivedDeviceInfo(const OCRepresentation& rep)
+    void receivedDeviceInfo(const OCRepresentation& /*rep*/)
     {
     }
 
-    void presenceHandler(OCStackResult result,
-            const unsigned int nonce, const std::string& hostAddress)
+    void presenceHandler(OCStackResult /*result*/,
+            const unsigned int /*nonce*/, const std::string& /*hostAddress*/)
     {
     }
 
@@ -697,7 +697,7 @@ namespace OCPlatformTest
 
     TEST(RegisterDeviceInfoTest, RegisterDeviceInfoWithEmptyObject)
     {
-        OCDeviceInfo di = {};
+        OCDeviceInfo di = {0};
         EXPECT_ANY_THROW(OCPlatform::registerDeviceInfo(di));
     }