Fix static analysis issues 31/262031/1
authorjh9216.park <jh9216.park@samsung.com>
Mon, 2 Aug 2021 02:57:27 +0000 (22:57 -0400)
committerjh9216.park <jh9216.park@samsung.com>
Mon, 2 Aug 2021 02:57:27 +0000 (22:57 -0400)
Change-Id: I826b51914540f0c8c6840e17b8e89e95935c144a
Signed-off-by: jh9216.park <jh9216.park@samsung.com>
parser/exec-checker/inc/exec_checker.hh
parser/exec-checker/inc/plugin_manager.hh
parser/exec-checker/src/exec_checker.cc

index 4324d296fe6154ac563bc807386ce8fb2fb6b886..7857e774193587f3e9feb59a182788c40985f679 100644 (file)
@@ -30,8 +30,8 @@ class ExecChecker {
 
  private:
   std::string path_;
-  int class_bit_;
-  uint16_t arch_bit_;
+  int class_bit_ = 0;
+  uint16_t arch_bit_ = 0;
 };
 
 }  // namespace plugin
index a322a655b3013445496bf100a7a95ec12f839b69..c6778886030fa0de1f70f84b0f707b202586ac82 100644 (file)
@@ -38,7 +38,7 @@ class PluginManager {
  private:
   std::unique_ptr<ExecChecker> self_;
   std::string package_;
-  xmlDocPtr doc_;
+  xmlDocPtr doc_ = nullptr;
 };
 
 }  // namespace plugin
index 713665ada015b26022a15eb2cf7e0edc9492c30d..23278afb10814d442b354977ba3601c3eaa0e34a 100644 (file)
@@ -111,8 +111,6 @@ bool ExecChecker::CheckDependencyLibs() {
   char buf[1000];
   while (!f.eof()) {
     f.getline(buf, sizeof(buf));
-    if (buf == nullptr)
-      continue;
 
     std::string line = buf;
     if (line.find("not found", 0) != line.npos) {