From 9275b44f4639690b53899587f70a85ec97879ee6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E5=A4=A9=E9=BE=99=20=28Armink=29?= Date: Sat, 20 May 2023 09:40:06 +0800 Subject: [PATCH] [kvdb] fix testcase build warning --- tests/fdb_kvdb_tc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/fdb_kvdb_tc.c b/tests/fdb_kvdb_tc.c index 35b5ca7..2136cf6 100644 --- a/tests/fdb_kvdb_tc.c +++ b/tests/fdb_kvdb_tc.c @@ -16,6 +16,7 @@ #include #include #include +#include #define RT_USING_UTEST @@ -222,7 +223,7 @@ static void test_fdb_create_kv(void) rt_tick_t tick = rt_tick_get(), read_tick; char value_buf[14], *read_value; - snprintf(value_buf, sizeof(value_buf), "%d", tick); + snprintf(value_buf, sizeof(value_buf), "%" PRIu32, tick); result = fdb_kv_set(&test_kvdb, TEST_KV_NAME, value_buf); uassert_true(result == FDB_NO_ERR); @@ -243,7 +244,7 @@ static void test_fdb_change_kv(void) read_tick = atoi(read_value); uassert_int_not_equal(tick, read_tick); - snprintf(value_buf, sizeof(value_buf), "%d", tick); + snprintf(value_buf, sizeof(value_buf), "%" PRIu32, tick); result = fdb_kv_set(&test_kvdb, TEST_KV_NAME, value_buf); uassert_true(result == FDB_NO_ERR);