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 4324d29..7857e77 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 a322a65..c677888 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 713665a..23278af 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) {