Fix Secure sample build warnings
authorSakthivel Samidurai <sakthivel.samidurai@intel.com>
Tue, 25 Aug 2015 21:55:53 +0000 (14:55 -0700)
committerJon A. Cruz <jonc@osg.samsung.com>
Wed, 26 Aug 2015 16:23:11 +0000 (16:23 +0000)
Change-Id: I0993913a67fdebf7717d513e9760b048f44ee59d
Signed-off-by: Sakthivel Samidurai <sakthivel.samidurai@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/2271
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
resource/csdk/stack/samples/linux/secure/ocserverbasicops.cpp

index a48bc3f..8db063c 100644 (file)
@@ -232,8 +232,7 @@ OCEntityHandlerCb (OCEntityHandlerFlag flag,
     OC_LOG_V (INFO, TAG, "Inside entity handler - flags: 0x%x", flag);
 
     OCEntityHandlerResult ehResult = OC_EH_ERROR;
-    OCEntityHandlerResponse response = OCEntityHandlerResponse();
-
+    OCEntityHandlerResponse response = { 0, 0, OC_EH_ERROR, 0, 0, { },{ 0 }, false };
     // Validate pointer
     if (!entityHandlerRequest)
     {
@@ -319,12 +318,7 @@ int main(int /*argc*/, char* /*argv*/[])
     OC_LOG(DEBUG, TAG, "OCServer is starting...");
 
     // Initialize Persistent Storage for SVR database
-    OCPersistentStorage ps = OCPersistentStorage();
-    ps.open = server_fopen;
-    ps.read = fread;
-    ps.write = fwrite;
-    ps.close = fclose;
-    ps.unlink = unlink;
+    OCPersistentStorage ps = { server_fopen, fread, fwrite, fclose, unlink };
     OCRegisterPersistentStorageHandler(&ps);
 
     if (OCInit(NULL, 0, OC_SERVER) != OC_STACK_OK)