IOT-2539 Fix -Wmissing-field-initializers 91/22891/2
authorGeorge Nash <george.nash@intel.com>
Tue, 17 Oct 2017 22:57:15 +0000 (15:57 -0700)
committerUze Choi <uzchoi@samsung.com>
Thu, 19 Oct 2017 07:08:29 +0000 (07:08 +0000)
Fix the missing-field-initializers warning in the
simulator code. OCDeviceInfo contains four
values not two.

Bug: https://jira.iotivity.org/browse/IOT-2539
Change-Id: Ifab39f7a5eb054eeb301cece2123e9cc6d19011c
Signed-off-by: George Nash <george.nash@intel.com>
service/simulator/src/simulator_manager.cpp

index 148885e..c738e61 100644 (file)
@@ -186,7 +186,7 @@ void SimulatorManager::setDeviceInfo(const std::string &deviceName)
 
     typedef OCStackResult (*RegisterDeviceInfo)(const OCDeviceInfo);
 
-    OCDeviceInfo ocDeviceInfo {nullptr, nullptr};
+    OCDeviceInfo ocDeviceInfo {nullptr, nullptr, nullptr, nullptr};
     ocDeviceInfo.deviceName = const_cast<char *>(deviceName.c_str());
     invokeocplatform(static_cast<RegisterDeviceInfo>(OC::OCPlatform::registerDeviceInfo),
                      ocDeviceInfo);