diff --git a/common/adaptor/src/file_operator.c b/common/adaptor/src/file_operator.c index dc13184359266806d8c5740b9cea7ee78ca79073..1a6396827837d23c22cb4c17f32716ad98efbb18 100644 --- a/common/adaptor/src/file_operator.c +++ b/common/adaptor/src/file_operator.c @@ -35,7 +35,7 @@ static bool IsFileExist(const char *fileName) static int32_t ReadFile(const char *fileName, uint8_t *buf, uint32_t len) { - if ((fileName == NULL) || (buf == NULL) || (len == 0) || (len > SIZE_MAX)) { + if ((fileName == NULL) || (buf == NULL) || (len == 0)) { LOG_ERROR("get bad params"); return RESULT_BAD_PARAM; } @@ -57,7 +57,7 @@ static int32_t ReadFile(const char *fileName, uint8_t *buf, uint32_t len) static int32_t WriteFile(const char *fileName, const uint8_t *buf, uint32_t len) { - if ((fileName == NULL) || (buf == NULL) || (len == 0) || (len > SIZE_MAX)) { + if ((fileName == NULL) || (buf == NULL) || (len == 0)) { LOG_ERROR("get bad params"); return RESULT_BAD_PARAM; } diff --git a/common/hal_sdk/useridm_interface.cpp b/common/hal_sdk/useridm_interface.cpp index 26ccf1e33cb43e681b1e9bfc533a9e7de6516252..e73b4e1cc40d268eb88580a7068cd11c4e96b958 100644 --- a/common/hal_sdk/useridm_interface.cpp +++ b/common/hal_sdk/useridm_interface.cpp @@ -37,7 +37,7 @@ int32_t OpenSession(int32_t userId, uint64_t &challenge) { GlobalLock(); int32_t ret = OpenEditSession(userId, &challenge); - LOG_INFO("challenge is %{public}llu", challenge); + LOG_INFO("challenge is %{public}llu", (unsigned long long)challenge); GlobalUnLock(); return ret; } diff --git a/common/idm/src/idm_session.c b/common/idm/src/idm_session.c index cb788b404ae35d9d3a5124f628aafc7c45c169ae..38d1f59367b4711d8127d67130c3f3ebf5cf98b4 100644 --- a/common/idm/src/idm_session.c +++ b/common/idm/src/idm_session.c @@ -183,8 +183,9 @@ bool IsSessionTimeout(void) } uint64_t currentTime = GetSystemTime(); if (currentTime < g_session->time || currentTime - g_session->time > SESSION_VALIDITY_PERIOD) { - LOG_ERROR("timeout, %{public}llu, %{public}llu", currentTime, g_session->time); + LOG_ERROR("timeout, %{public}llu, %{public}llu", + (unsigned long long)currentTime, (unsigned long long)g_session->time); return true; } return false; -} \ No newline at end of file +}