From e772dc4384cb95405e1a7074b64d24029d1e1b3f Mon Sep 17 00:00:00 2001 From: zhangsizheng Date: Tue, 27 May 2025 17:13:20 +0800 Subject: [PATCH] fix data type inconsistency and make HandleAbort static Signed-off-by: zhangsizheng --- src/js_native_api_v8.cpp | 2 +- test/unittest/test_jsvm.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js_native_api_v8.cpp b/src/js_native_api_v8.cpp index 00cabab..36d9fbb 100644 --- a/src/js_native_api_v8.cpp +++ b/src/js_native_api_v8.cpp @@ -2873,7 +2873,7 @@ JSVM_Status OH_JSVM_GetCbInfo(JSVM_Env env, // [in] JSVM environment if (UNLIKELY(env->debugFlags)) { if (UNLIKELY(env->debugFlags & (1 << JSVM_SCOPE_CHECK))) { if (argv != nullptr) { - for (int i = 0; i <= *argc; i++) { + for (size_t i = 0; i <= *argc; i++) { ADD_VAL_TO_SCOPE_CHECK(env, argv[i]); } } diff --git a/test/unittest/test_jsvm.cpp b/test/unittest/test_jsvm.cpp index 5283a45..a5632b1 100644 --- a/test/unittest/test_jsvm.cpp +++ b/test/unittest/test_jsvm.cpp @@ -1558,7 +1558,7 @@ HWTEST_F(JSVMTest, test_set_debug_option1, TestSize.Level1) static bool g_fatalErrorFinished = false; -void HandleAbort(int sig) +static void HandleAbort(int sig) { g_fatalErrorFinished = true; longjmp(g_buf, 1); -- Gitee