From 84bd51e48e6d6825e066d41ba94e1a0fec62237e Mon Sep 17 00:00:00 2001 From: zhaoyongjin1 Date: Mon, 26 Feb 2024 14:53:53 +0800 Subject: [PATCH] =?UTF-8?q?4.1=5Frelease=E6=BC=8F=E6=B4=9E=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhaoyongjin1 --- .../inner_api/file_access/src/js_file_access_ext_ability.cpp | 2 +- test/unittest/external_notify_test.cpp | 3 ++- utils/user_access_tracer.h | 3 +-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/interfaces/inner_api/file_access/src/js_file_access_ext_ability.cpp b/interfaces/inner_api/file_access/src/js_file_access_ext_ability.cpp index 0af42686..bb9da3dc 100644 --- a/interfaces/inner_api/file_access/src/js_file_access_ext_ability.cpp +++ b/interfaces/inner_api/file_access/src/js_file_access_ext_ability.cpp @@ -244,7 +244,7 @@ int JsFileAccessExtAbility::CallJsMethod(const std::string &funcName, JsRuntime CallJsParam *param = reinterpret_cast(work->data); if (param == nullptr) { HILOG_ERROR("failed to get CallJsParam."); - return; + return; } napi_handle_scope scope = nullptr; diff --git a/test/unittest/external_notify_test.cpp b/test/unittest/external_notify_test.cpp index dbe74f90..b419a7cf 100644 --- a/test/unittest/external_notify_test.cpp +++ b/test/unittest/external_notify_test.cpp @@ -49,6 +49,7 @@ vector g_notifyUris; const int SLEEP_TIME = 600 * 1000; const int UID_TRANSFORM_TMP = 20000000; const int UID_DEFAULT = 0; +const int SLEEP_TIME_TWO = 2; shared_ptr g_context = nullptr; void SetNativeToken() @@ -862,7 +863,7 @@ static void RegisterDirNotify(Uri parentUri, std::string dirName, IFileAccessObs usleep(SLEEP_TIME); EXPECT_EQ(g_notifyEvent, DELETE_EVENT); EXPECT_EQ(g_notifyUri, newDirUriTest.ToString()); - sleep(2); + sleep(SLEEP_TIME_TWO); g_fah->UnregisterNotify(newDirUriTest, myObserver); } diff --git a/utils/user_access_tracer.h b/utils/user_access_tracer.h index d0e9c2fb..e1d596bf 100644 --- a/utils/user_access_tracer.h +++ b/utils/user_access_tracer.h @@ -25,7 +25,7 @@ public: virtual ~UserAccessTracer() { - for (int32_t i = 0; i < count_; i++ ) { + for (int32_t i = 0; i < count_; i++) { FinishTrace(HITRACE_TAG_FILEMANAGEMENT); } count_ = 0; @@ -44,7 +44,6 @@ public: } private: int32_t count_ = 0; - }; #endif // OHOS_USER_ACCESS_TRACER -- Gitee