From c8c1bfd1f7bcbd2d4105136e5e626e2e2daa4a7c Mon Sep 17 00:00:00 2001 From: Tianshi Liu Date: Wed, 11 May 2022 16:19:00 +0800 Subject: [PATCH] fix:code review issue Change-Id: I84ce22c7b27e59f02ee2d89d7bf1ecb9b485e9f6 Signed-off-by: Tianshi Liu --- common/include/face_auth_log_wrapper.h | 10 ---------- services/src/face_auth_executor_hdi.cpp | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/common/include/face_auth_log_wrapper.h b/common/include/face_auth_log_wrapper.h index fdd3ccf..5cd6f7d 100644 --- a/common/include/face_auth_log_wrapper.h +++ b/common/include/face_auth_log_wrapper.h @@ -81,16 +81,6 @@ static constexpr OHOS::HiviewDFX::HiLogLabel FACE_AUTH_LABEL[MODULE_MAX] = { FORMATTED(__VA_ARGS__)) #define FACEAUTH_HILOGD(module, ...) (void)OHOS::HiviewDFX::HiLog::Debug(FACE_AUTH_LABEL[module], \ FORMATTED(__VA_ARGS__)) -const uint64_t MASK = 0xffff; -const size_t MASKED_STRING_LEN = 11; -inline std::string getMaskedString(uint64_t val) -{ - char bytes[MASKED_STRING_LEN] = {0}; - if (snprintf_s(bytes, sizeof(bytes), sizeof(bytes) - 1, "0xXXXX%04" PRIx64, val & MASK) == 0) { - return "(snprintf fail)"; - } - return std::string(bytes); -} inline std::string getPointerNullString(void *p) { diff --git a/services/src/face_auth_executor_hdi.cpp b/services/src/face_auth_executor_hdi.cpp index 6f2f4c0..53ba8b9 100644 --- a/services/src/face_auth_executor_hdi.cpp +++ b/services/src/face_auth_executor_hdi.cpp @@ -170,7 +170,7 @@ UserIAM::ResultCode FaceAuthExecutorHdi::SendCommand(UserAuth::AuthPropertyMode UserIAM::ResultCode FaceAuthExecutorHdi::MoveHdiExecutorInfo(FaceHdi::ExecutorInfo &in, UserIAM::ExecutorInfo &out) { out.executorId = static_cast(in.sensorId); - out.executorType = in.executorType; + out.executorType = static_cast(in.executorType); int32_t ret = ConvertExecutorRole(in.executorRole, out.role); if (ret != UserIAM::ResultCode::SUCCESS) { IAM_LOGE("executorProxy is null");