From 8b1072161b9498fed88a3ba346088f40a0cc523a Mon Sep 17 00:00:00 2001 From: lixianjing Date: Fri, 16 Aug 2024 17:10:05 +0800 Subject: [PATCH] fix build warnings --- tests/value_test.cc | 4 ++-- tools/fdb/fdb.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/value_test.cc b/tests/value_test.cc index f27806c19..6af8a118e 100644 --- a/tests/value_test.cc +++ b/tests/value_test.cc @@ -1384,7 +1384,7 @@ TEST(value, expt) { } TEST(value, min) { - int32_t i = 0; + uint32_t i = 0; value_t v[10]; value_t o; @@ -1461,7 +1461,7 @@ TEST(value, min) { } TEST(value, max) { - int32_t i = 0; + uint32_t i = 0; value_t v[10]; value_t o; diff --git a/tools/fdb/fdb.cpp b/tools/fdb/fdb.cpp index c1fd6ce41..02df118c3 100644 --- a/tools/fdb/fdb.cpp +++ b/tools/fdb/fdb.cpp @@ -174,7 +174,7 @@ static ret_t fdb_show_threads(const char* title, tk_object_t* obj) { tk_snprintf(path, sizeof(path) - 1, "body.threads.[%d].id", i); id = tk_object_get_prop_uint64(obj, path, 0); - log_debug("[%llu]: %s\n", id, name); + log_debug("[%" PRIu64 "]: %s\n", id, name); } } @@ -470,7 +470,7 @@ static ret_t fdb_show_callstack(app_info_t* app, uint32_t start, uint32_t level, obj = debugger_get_callstack(app->debugger); } - log_debug("thread_id:%lld callstack:\n---------------------------\n", + log_debug("thread_id:%" PRIu64 " callstack:\n---------------------------\n", debugger_get_current_thread_id(app->debugger)); n = tk_object_get_prop_uint32(obj, DEBUGER_CALLSTACK_NODE_NAME ".#size", 0); for (i = 0; i < n; i++) { @@ -624,7 +624,7 @@ static ret_t func_frame(app_info_t* app, tokenizer_t* tokenizer) { static ret_t func_get_curr_frame(app_info_t* app, tokenizer_t* tokenizer) { uint64_t thread_id = debugger_get_current_thread_id(app->debugger); int32_t frame = debugger_get_current_frame(app->debugger); - log_debug("thread_id:%llu, frame:%d", thread_id, frame); + log_debug("thread_id:%" PRIu64 ", frame:%d", thread_id, frame); log_debug("\n"); return RET_OK; }