fix: removed string format warnings for int32_t and uint32_t (#2924)

* fix:Removed string format warnings for int32_t and uint32_t
re-handle #2722

* feat(rt-thread): add the option of built-in examples
This commit is contained in:
Man, Jianting (Meco)
2021-12-20 03:52:07 -05:00
committed by GitHub
parent 01daed356a
commit 70778fb9e4
14 changed files with 45 additions and 30 deletions

View File

@@ -74,7 +74,7 @@ void lv_example_table_2(void)
uint32_t i;
for(i = 0; i < ITEM_CNT; i++) {
lv_table_set_cell_value_fmt(table, i, 0, "Item %d", i + 1);
lv_table_set_cell_value_fmt(table, i, 0, "Item %"LV_PRIu32, i + 1);
}
lv_obj_align(table, LV_ALIGN_CENTER, 0, -20);
@@ -86,13 +86,13 @@ void lv_example_table_2(void)
lv_mem_monitor_t mon2;
lv_mem_monitor(&mon2);
long unsigned int mem_used = mon1.free_size - mon2.free_size;
uint32_t mem_used = mon1.free_size - mon2.free_size;
unsigned int elaps = lv_tick_elaps(t);
uint32_t elaps = lv_tick_elaps(t);
lv_obj_t * label = lv_label_create(lv_scr_act());
lv_label_set_text_fmt(label, "%d items were created in %u ms\n"
"using %lu bytes of memory",
lv_label_set_text_fmt(label, "%"LV_PRIu32" items were created in %"LV_PRIu32" ms\n"
"using %"LV_PRIu32" bytes of memory",
ITEM_CNT, elaps, mem_used);
lv_obj_align(label, LV_ALIGN_BOTTOM_MID, 0, -10);