From: Jihoi Kim Date: Fri, 3 Jan 2025 06:34:01 +0000 (+0900) Subject: Fix static analysis issue X-Git-Tag: accepted/tizen/9.0/unified/20250114.041557~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ee0ead671da445d452fc6fbfcf332ff7ba34913f;p=platform%2Fcore%2Fappfw%2Flaunchpad.git Fix static analysis issue - Fix UNINIT_CTOR - Fix AUTO_CAUSES_COPY - Fix COMPARE_RESULT_OF_NEW Change-Id: I4dda5ce91d04101513b2821dc4ca9951a3f154d4 Signed-off-by: Jihoi Kim --- diff --git a/src/launchpad-process-pool/launchpad.cc b/src/launchpad-process-pool/launchpad.cc index 3f294ee4..6bb13dbb 100644 --- a/src/launchpad-process-pool/launchpad.cc +++ b/src/launchpad-process-pool/launchpad.cc @@ -711,9 +711,9 @@ bool Launchpad::InitConfig() { void Launchpad::OnSigchldReceived(pid_t pid, int status) { fast_launches_.erase(pid); - auto found = pid_map_.find(pid); + const auto& found = pid_map_.find(pid); if (found != pid_map_.end()) { - auto appid = found->second; + const auto& appid = found->second; _E("pid=%d, appid=%s", pid, appid.c_str()); pid_map_.erase(found); } diff --git a/src/lib/launchpad-common/server_socket.cc b/src/lib/launchpad-common/server_socket.cc index af98bb73..a0cff221 100644 --- a/src/lib/launchpad-common/server_socket.cc +++ b/src/lib/launchpad-common/server_socket.cc @@ -54,7 +54,8 @@ std::unique_ptr ServerSocket::Accept() { return nullptr; } - return std::unique_ptr(new ClientSocket(client_fd)); + return std::unique_ptr( + new (std::nothrow) ClientSocket(client_fd)); } void ServerSocket::Bind(const std::string& bindpoint) { diff --git a/src/lib/launchpad-core/hw_acceleration_config.hh b/src/lib/launchpad-core/hw_acceleration_config.hh index d3ac2d90..717e48da 100644 --- a/src/lib/launchpad-core/hw_acceleration_config.hh +++ b/src/lib/launchpad-core/hw_acceleration_config.hh @@ -33,7 +33,7 @@ class HWAccelerationConfig : public Vconf::IEvent { private: Vconf vconf_; - int hwacc_; + int hwacc_ = SETTING_HW_ACCELERATION_NONE; bool init_ = false; };