[M120 Migration][WRTjs][Service] Fix some coverity issues 28/305528/3
authorzhaosy <shiyusy.zhao@samsung.com>
Sun, 4 Feb 2024 06:07:34 +0000 (14:07 +0800)
committerDongHyun Song <dh81.song@samsung.com>
Mon, 5 Feb 2024 04:54:11 +0000 (04:54 +0000)
Add initialize for fix some coverity issues.

Reference:
https://review.tizen.org/gerrit/#/c/platform/framework/web/chromium-efl/+/305090/

Change-Id: I48a84938fa030fdec0f34a12cd5801b2ab76c06b
Signed-off-by: zhaosy <shiyusy.zhao@samsung.com>
wrt/src/browser/tv/native_web_runtime_delegate_tv.cc
wrt/src/service/wrt_service_manager.h

index fc12c6d..285fc36 100644 (file)
@@ -675,7 +675,6 @@ void NativeWebRuntimeDelegateTV::PreloadVconfKeys() {
   const char* kVconfVoiceTouchAutoMode = "db/voice/vc/voice_touch/automode";
   const char* kVconfRotationState = "db/sysman/rotation_state";
 
-  const char* kVconfDisplayRotatorStatus = "memory/display_rotator/status";
   const char* kVconfLowMemory = "memory/sysman/low_memory";
   const char* kVconfProxy = "memory/dnet/proxy";
 
@@ -689,7 +688,6 @@ void NativeWebRuntimeDelegateTV::PreloadVconfKeys() {
   VconfHandle(kVconfVoiceTouchAutoMode).Bool();
   VconfHandle(kVconfRotationState).Int();
 
-  VconfHandle(kVconfDisplayRotatorStatus).Int();
   VconfHandle(kVconfLowMemory).Int();
   VconfHandle(kVconfProxy).Str();
   LOG(INFO) << "PreloadVconfKeys end";
index e915751..c29a365 100644 (file)
@@ -77,9 +77,9 @@ class WRTServiceManager {
   bool HandleMessageQueue();
   int RegisterDbusHandler();
 
-  uv_async_t handle_adder_;
-  uv_async_t handle_remover_;
-  uv_async_t handle_builtin_;
+  uv_async_t handle_adder_ = {};
+  uv_async_t handle_remover_ = {};
+  uv_async_t handle_builtin_ = {};
   uv_mutex_t mutex_;
 
   std::vector<std::string> prepared_to_start_services_;
@@ -97,10 +97,10 @@ class WRTServiceManager {
   std::string internal_id_;
   std::string removed_internal_id;
 
-  uv_thread_t dbus_thread_;
+  uv_thread_t dbus_thread_ = {};
   uv_timer_t timeout_handle_ = {};
   WRTService::ServiceType service_model_ = WRTService::NONE;
-  unsigned int exit_count_;
+  unsigned int exit_count_ = 120;
   bool quit_requested_ = false;
   int ppid_ = 0;
   std::queue<std::pair<std::string, std::string>> message_queue_;