Fix static analysis issues 07/282107/2
authorHwankyu Jhun <h.jhun@samsung.com>
Tue, 27 Sep 2022 06:13:25 +0000 (06:13 +0000)
committerHwanKyu Jhun <h.jhun@samsung.com>
Tue, 27 Sep 2022 06:34:38 +0000 (06:34 +0000)
The following issues are fixed:
 - ODR_VIOLATION

Change-Id: I21535974477d97dd9c93eb570870557202d8f897
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
14 files changed:
aul/app_manager/app_context.cc
aul/app_manager/app_context.hh
aul/app_manager/app_manager.cc
aul/app_manager/app_manager.hh
aul/component/component_port.cc
aul/component/component_port.hh
aul/socket/packet.cc
aul/socket/packet.hh
parser/boot-sequencer/exception.cc
parser/boot-sequencer/exception.hh
parser/boot-sequencer/parser_plugin.cc
parser/boot-sequencer/parser_plugin.hh
server/exception.cc
server/exception.hh

index 7bd494f..bbdc79e 100644 (file)
@@ -81,8 +81,6 @@ AppContext::AppContext(std::string app_id,
     is_sub_app_(is_sub_app) {
 }
 
-AppContext::~AppContext() = default;
-
 const std::string& AppContext::GetAppId() const {
   return app_id_;
 }
index 4ef30f2..7a4b16d 100644 (file)
@@ -47,7 +47,7 @@ class AppContext {
   };
 
   explicit AppContext(tizen_base::Bundle b);
-  virtual ~AppContext();
+  virtual ~AppContext() = default;
 
   const std::string& GetAppId() const;
   const std::string& GetPkgId() const;
index 2362fc8..702849e 100644 (file)
 
 namespace aul {
 
-AppManager::AppManager() = default;
-
-AppManager::~AppManager() = default;
-
 AppManager::AppContextList AppManager::GetAppContexts() {
   AppContextList list;
   int ret = aul_app_get_running_app_info(AppInfoCb, &list);
index 136c849..d6f9bea 100644 (file)
@@ -31,8 +31,8 @@ class AppManager {
  public:
   using AppContextList = std::list<std::unique_ptr<AppContext>>;
 
-  AppManager();
-  virtual ~AppManager();
+  AppManager() = default;
+  virtual ~AppManager() = default;
 
   AppContextList GetAppContexts();
   AppContextList GetAllAppContexts();
index dfa3a90..e4e52b8 100644 (file)
@@ -32,8 +32,6 @@ ComponentPort::ComponentPort(std::string name)
     : name_(std::move(name)) {
 }
 
-ComponentPort::~ComponentPort() = default;
-
 bool ComponentPort::Exist() {
   int ret = SendRequest(COMP_PORT_EXIST, AUL_SOCK_NONE);
   if (ret < 0) {
index 7de6d0b..8c563b8 100644 (file)
@@ -24,7 +24,7 @@ namespace aul {
 class ComponentPort {
  public:
   explicit ComponentPort(std::string name);
-  virtual ~ComponentPort();
+  virtual ~ComponentPort() = default;
 
   bool Exist();
   int Create();
index d99ab9f..d4f90c1 100644 (file)
@@ -40,8 +40,6 @@ Packet::Packet(const unsigned char* buf, unsigned int size)
   parcel.ReadParcelable(this);
 }
 
-Packet::~Packet() = default;
-
 int Packet::GetCmd() const {
   return cmd_;
 }
index 7b61e0d..2fd1ac7 100644 (file)
@@ -31,7 +31,7 @@ class Packet : public tizen_base::Parcelable {
   Packet(int cmd, int opt, std::vector<unsigned char> data);
   Packet(int cmd, int opt, tizen_base::Bundle data);
   Packet(const unsigned char* buf, unsigned int size);
-  virtual ~Packet();
+  virtual ~Packet() = default;
 
   int GetCmd() const;
   int GetOpt() const;
index 59b5f41..5318263 100644 (file)
@@ -26,8 +26,6 @@ Exception::Exception(int error_code, std::string file, int line)
       std::to_string(line) + " code:" + std::to_string(error_code_);
 }
 
-Exception::~Exception() = default;
-
 const char* Exception::what() const noexcept {
   return message_.c_str();
 }
index e302aab..c8c63ff 100644 (file)
@@ -27,7 +27,7 @@ namespace boot_sequencer {
 class Exception : public std::exception {
  public:
   explicit Exception(int error_code, std::string file, int line);
-  virtual ~Exception();
+  virtual ~Exception() = default;
 
   virtual const char* what() const noexcept;
   int GetErrorCode() const;
index e771d25..88fc6f7 100644 (file)
@@ -149,8 +149,6 @@ int ParserPlugin::Undo() {
 
 ParserPlugin::ParserPlugin() : db_(new AppSvcDB(GetTargetUid())) {}
 
-ParserPlugin::~ParserPlugin() = default;
-
 int ParserPlugin::Prepare() {
   try {
     db_->Open();
index e6cceef..4781ac1 100644 (file)
@@ -37,7 +37,7 @@ class ParserPlugin {
 
  private:
   ParserPlugin();
-  ~ParserPlugin();
+  ~ParserPlugin() = default;
 
   int Prepare();
   int StepBackup();
index 318edbe..8cb2f6a 100644 (file)
@@ -26,8 +26,6 @@ Exception::Exception(int error_code, std::string file, int line)
       std::to_string(line) + " code:" + std::to_string(error_code_);
 }
 
-Exception::~Exception() = default;
-
 const char* Exception::what() const noexcept {
   return message_.c_str();
 }
index c8c1647..67b2b1e 100644 (file)
@@ -27,7 +27,7 @@ namespace aul {
 class Exception : public std::exception {
  public:
   explicit Exception(int error_code, std::string file, int line);
-  virtual ~Exception();
+  virtual ~Exception() = default;
 
   virtual const char* what() const noexcept;
   int GetErrorCode();