fix(examples) resolve string formatting compiler warnings (#3654)

This commit is contained in:
Douglas Healy
2022-09-04 15:47:38 +02:00
committed by GitHub
parent bb4f4cecf9
commit 3b7411893f
6 changed files with 7 additions and 7 deletions

View File

@@ -18,11 +18,11 @@ static void float_btn_event_cb(lv_event_t * e)
cont = lv_menu_cont_create(sub_page);
label = lv_label_create(cont);
lv_label_set_text_fmt(label, "Hello, I am hiding inside %i", btn_cnt);
lv_label_set_text_fmt(label, "Hello, I am hiding inside %"LV_PRIu32"", btn_cnt);
cont = lv_menu_cont_create(main_page);
label = lv_label_create(cont);
lv_label_set_text_fmt(label, "Item %i", btn_cnt);
lv_label_set_text_fmt(label, "Item %"LV_PRIu32"", btn_cnt);
lv_menu_set_load_page_event(menu, cont, sub_page);
lv_obj_scroll_to_view_recursive(cont, LV_ANIM_ON);

View File

@@ -94,7 +94,7 @@ void lv_example_table_2(void)
lv_obj_t * label = lv_label_create(lv_scr_act());
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);
(uint32_t)ITEM_CNT, elaps, mem_used);
lv_obj_align(label, LV_ALIGN_BOTTOM_MID, 0, -10);