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 7bd494f28d047f0b1b36b1a2c6007f7188866219..bbdc79e263c0cb9dc90c6b517fb6399344e679fd 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 4ef30f2997ef19876d261a469f5a986250cc2830..7a4b16d1610940964691ed67f1dd92d672f0b7d1 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 2362fc8590e9c39c857e978b3a9cb586f266563f..702849ee9b7a3674d3f8c6ce531ed9ab59d01576 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 136c84945b148d00b8c3c7198f3c13d603274552..d6f9beae043de9758408027456492b23a1ec12de 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 dfa3a9037c65a61a181bff6f5409a281001f607d..e4e52b82deca9d8129689ecc3ed4326a525f5c3b 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 7de6d0b73a240503c4fffd3a77bed1cb633adc3f..8c563b8f07679f6a65a2ac89a4b3e217fde1bf9a 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 d99ab9f2631f27f32059a8504397c5dcc3b7ce64..d4f90c1ac43454c24357f526445d60597f8843bf 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 7b61e0d08ac206a89e71a18bf286fcae48cc180e..2fd1ac7f15e910cc9929c84ea3abbfe99fb82fa6 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 59b5f41b5d2c21b8677796f8ae9b6fefd54011c4..53182630d9081da216d6bebbe6dac8cd99f8e2b0 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 e302aabde1b682657780c001755937451a3719cd..c8c63ff069a790f82f0a130f634f00fdab8c105f 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 e771d25934b1f23d485b74fb9ff9e8ea049c2566..88fc6f79abd056c2faf70b85ab1bd9091680ddf7 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 e6cceef6ee89ca08a413604deae02fad35023369..4781ac10200bfa5a403b0c5cc3d855f1360c0edc 100644 (file)
@@ -37,7 +37,7 @@ class ParserPlugin {
 
  private:
   ParserPlugin();
-  ~ParserPlugin();
+  ~ParserPlugin() = default;
 
   int Prepare();
   int StepBackup();
index 318edbede9bbbda7e0047086585cf61ecdbf27dc..8cb2f6ad504e4721be9ca86adc53efec5bf2d551 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 c8c1647f95ba8c1a97a1b835c6bb4757e1222716..67b2b1e7af224137819d28696a74538aa0cc1813 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();