Initialize not initialized member values 42/190342/1
authorhyunho <hhstark.kang@samsung.com>
Mon, 1 Oct 2018 06:25:50 +0000 (15:25 +0900)
committerhyunho <hhstark.kang@samsung.com>
Mon, 1 Oct 2018 06:25:50 +0000 (15:25 +0900)
Change-Id: Ifddab062f4818e06ef6d42f05164dc3d2c13154d
Signed-off-by: hyunho <hhstark.kang@samsung.com>
unittest/src/test-complication.cc
watchface-complication/complication.cc

index 62a8f24..e92bde1 100644 (file)
@@ -50,7 +50,7 @@ class WatchComplication : public Complication {
   virtual ~WatchComplication() = default;
 
  public:
-  bool not_available_;
+  bool not_available_ = false;
 };
 
 class WC : public ::testing::Test {
index d02dd60..3040dee 100644 (file)
@@ -157,6 +157,7 @@ Complication::Impl::Impl(Complication* parent, int id,
     supported_event_types_(supported_event_types | 1),
     default_provider_id_(default_provider_id),
     default_type_(default_type),
+    cur_type_(default_type),
     gdbus_(std::unique_ptr<IGDBus>(ComplicationConnector::GetInst(mock).CreateGDBus(mock))),
     package_(std::unique_ptr<IPackageManager>(ComplicationConnector::GetInst(mock).CreatePackageManager(mock))),
     mock_(mock) {
@@ -731,8 +732,6 @@ int Complication::SendDataUpdateRequest() {
                   impl_->complication_id_,
                   impl_->cur_type_,
                   context_data_raw));
-
-
   if (emit_ret == false)
     ret = WATCHFACE_COMPLICATION_ERROR_IO_ERROR;