From: Junghyun Yeon Date: Mon, 23 Oct 2017 10:07:35 +0000 (+0900) Subject: Fix coding rule and supress build warning X-Git-Tag: submit/tizen/20171107.031828~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F99%2F157099%2F5;p=platform%2Fcore%2Fappfw%2Fapp-installers.git Fix coding rule and supress build warning Change-Id: I8ca81a25867bea6d5a7955bf3e470412f349bd8b Signed-off-by: Junghyun Yeon --- diff --git a/src/common/app2ext_dynamic_service.h b/src/common/app2ext_dynamic_service.h index ea0acac..646b2f3 100644 --- a/src/common/app2ext_dynamic_service.h +++ b/src/common/app2ext_dynamic_service.h @@ -12,7 +12,7 @@ #include #include - +#include namespace common_installer { diff --git a/src/common/certificate_validation.cc b/src/common/certificate_validation.cc index cb60490..3526af4 100644 --- a/src/common/certificate_validation.cc +++ b/src/common/certificate_validation.cc @@ -238,7 +238,7 @@ bool ValidateSignatures(const bf::path& base_path, return true; } -bool CheckPrivLevelFromFile(std::string& pkgid, PrivilegeLevel* level) { +bool CheckPrivLevelFromFile(const std::string& pkgid, PrivilegeLevel* level) { CertSvcInstance instance; CertSvcCertificate certificate; CertSvcVisibility visibility = CERTSVC_VISIBILITY_DEVELOPER; @@ -263,8 +263,8 @@ bool CheckPrivLevelFromFile(std::string& pkgid, PrivilegeLevel* level) { return false; } ret = certsvc_certificate_new_from_memory(instance, - (const unsigned char *)dist_root.c_str(), - strlen((char* )dist_root.c_str()), + reinterpret_cast(dist_root.c_str()), + strlen(dist_root.c_str()), CERTSVC_FORM_DER_BASE64, &certificate); if (ret != CERTSVC_SUCCESS) { diff --git a/src/common/certificate_validation.h b/src/common/certificate_validation.h index 356ce61..de5db7f 100644 --- a/src/common/certificate_validation.h +++ b/src/common/certificate_validation.h @@ -41,7 +41,7 @@ bool ValidatePrivilegeLevel(common_installer::PrivilegeLevel level, uid_t uid, const char* api_version, GList* privileges, std::string* error_message); -bool CheckPrivLevelFromFile(std::string& pkgid, PrivilegeLevel* level); +bool CheckPrivLevelFromFile(const std::string& pkgid, PrivilegeLevel* level); bool ValidateMetadataPrivilege(common_installer::PrivilegeLevel level, const char* api_version, GList* metadata_list, diff --git a/src/common/paths.cc b/src/common/paths.cc index 71733cb..32690e0 100644 --- a/src/common/paths.cc +++ b/src/common/paths.cc @@ -30,7 +30,7 @@ boost::filesystem::path GetBackupPath(const boost::filesystem::path& pkg_path) { return backup_path; } -bool DeviceSupportedCallback(int storage_id, storage_type_e type, +bool DeviceSupportedCallback(int, storage_type_e type, storage_state_e state, const char* path, void* user_data) { if (type != STORAGE_TYPE_EXTENDED_INTERNAL) return true; diff --git a/src/common/step/pkgmgr/step_register_app.cc b/src/common/step/pkgmgr/step_register_app.cc index 5297471..a30dbc4 100644 --- a/src/common/step/pkgmgr/step_register_app.cc +++ b/src/common/step/pkgmgr/step_register_app.cc @@ -2,14 +2,14 @@ #include "common/step/pkgmgr/step_register_app.h" +#include + #include #include #include #include #include -#include - #include "common/pkgmgr_registration.h" #include "common/utils/file_util.h" diff --git a/src/common/step/security/step_privacy_privilege.cc b/src/common/step/security/step_privacy_privilege.cc index d588236..99b09d8 100644 --- a/src/common/step/security/step_privacy_privilege.cc +++ b/src/common/step/security/step_privacy_privilege.cc @@ -6,6 +6,8 @@ #include +#include + #include "common/privileges.h" namespace ci = common_installer; @@ -14,8 +16,7 @@ namespace common_installer { namespace security { GList* StepPrivacyPrivilege::GetPrivilege( - GList* privileges, privilege_manager_package_type_e type) -{ + GList* privileges, privilege_manager_package_type_e type) { GList* privilege = NULL; if (type == PRVMGR_PACKAGE_TYPE_CORE) privilege = ci::PrivilegeXToPrivilege(privileges, @@ -35,7 +36,7 @@ bool StepPrivacyPrivilege::SetPrivacyPrivilege( {PRVMGR_PACKAGE_TYPE_WRT} }; - for (auto& type :pType) { + for (auto& type : pType) { GList *privilege = GetPrivilege(privileges, type); if (privilege) { int ret = privilege_package_info_set_privacy_privilege(uid, pkgid, diff --git a/src/common/step/security/step_register_trust_anchor.h b/src/common/step/security/step_register_trust_anchor.h index 0822e5d..8fb898d 100644 --- a/src/common/step/security/step_register_trust_anchor.h +++ b/src/common/step/security/step_register_trust_anchor.h @@ -15,8 +15,8 @@ namespace security { class StepRegisterTrustAnchor : public Step { public: enum class RegisterType { - INSTALL, // Register trust anchor with new package - UPDATE // Update trust anchor with existing package + INSTALL, // Register trust anchor with new package + UPDATE // Update trust anchor with existing package }; explicit StepRegisterTrustAnchor(common_installer::InstallerContext* context,