From: Junghyun Yeon Date: Wed, 3 Mar 2021 11:07:12 +0000 (+0900) Subject: Fix static analysis issue X-Git-Tag: submit/tizen/20210317.082331~86 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6c136a813b458fa76701824836b9289677ebbee4;p=platform%2Fcore%2Fappfw%2Fpkgmgr-info.git Fix static analysis issue - Add default initializer at constructor. - Remove unused variable. Signed-off-by: Junghyun Yeon --- diff --git a/src/common/database/abstract_db_handler.cc b/src/common/database/abstract_db_handler.cc index 872c53e..91585c4 100644 --- a/src/common/database/abstract_db_handler.cc +++ b/src/common/database/abstract_db_handler.cc @@ -257,7 +257,6 @@ bool AbstractDBHandler::Connect() { return false; } std::string db_path = GetDBPath(); - int flag = 0; int ret = 0; if (op_type_ == OPERATION_TYPE_READ) ret = __open_read_db(db_path.c_str(), &db_, SQLITE_OPEN_READONLY); diff --git a/src/common/parcel/pkginfo_parcelable.cc b/src/common/parcel/pkginfo_parcelable.cc index 9b7e03f..2705528 100644 --- a/src/common/parcel/pkginfo_parcelable.cc +++ b/src/common/parcel/pkginfo_parcelable.cc @@ -437,7 +437,7 @@ package_x *PkgInfoParcelable::ReadPackage(tizen_base::Parcel* parcel) { } PkgInfoParcelable::PkgInfoParcelable() - : AbstractParcelable(0, ParcelableType::PkgInfo) {} + : AbstractParcelable(0, ParcelableType::PkgInfo), write_type_(WriteType::None) {} PkgInfoParcelable::PkgInfoParcelable(uid_t uid, std::vector&& pkg_list, WriteType write_type) : AbstractParcelable(uid, ParcelableType::PkgInfo), pkg_list_(std::move(pkg_list)), write_type_(write_type) {}