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

@@ -18,7 +18,7 @@ void lv_example_flex_1(void)
lv_obj_align_to(cont_col, cont_row, LV_ALIGN_OUT_BOTTOM_MID, 0, 5);
lv_obj_set_flex_flow(cont_col, LV_FLEX_FLOW_COLUMN);
unsigned int i;
uint32_t i;
for(i = 0; i < 10; i++) {
lv_obj_t * obj;
lv_obj_t * label;
@@ -36,7 +36,7 @@ void lv_example_flex_1(void)
lv_obj_set_size(obj, LV_PCT(100), LV_SIZE_CONTENT);
label = lv_label_create(obj);
lv_label_set_text_fmt(label, "Item: %u", i);
lv_label_set_text_fmt(label, "Item: %"LV_PRIu32, i);
lv_obj_center(label);
}
}

View File

@@ -17,13 +17,13 @@ void lv_example_flex_2(void)
lv_obj_center(cont);
lv_obj_add_style(cont, &style, 0);
unsigned int i;
uint32_t i;
for(i = 0; i < 8; i++) {
lv_obj_t * obj = lv_obj_create(cont);
lv_obj_set_size(obj, 70, LV_SIZE_CONTENT);
lv_obj_t * label = lv_label_create(obj);
lv_label_set_text_fmt(label, "%u", i);
lv_label_set_text_fmt(label, "%"LV_PRIu32, i);
lv_obj_center(label);
}
}

View File

@@ -12,13 +12,13 @@ void lv_example_flex_4(void)
lv_obj_center(cont);
lv_obj_set_flex_flow(cont, LV_FLEX_FLOW_COLUMN_REVERSE);
unsigned int i;
uint32_t i;
for(i = 0; i < 6; i++) {
lv_obj_t * obj = lv_obj_create(cont);
lv_obj_set_size(obj, 100, 50);
lv_obj_t * label = lv_label_create(obj);
lv_label_set_text_fmt(label, "Item: %u", i);
lv_label_set_text_fmt(label, "Item: %"LV_PRIu32, i);
lv_obj_center(label);
}
}

View File

@@ -21,13 +21,13 @@ void lv_example_flex_5(void)
lv_obj_center(cont);
lv_obj_set_flex_flow(cont, LV_FLEX_FLOW_ROW_WRAP);
unsigned int i;
uint32_t i;
for(i = 0; i < 9; i++) {
lv_obj_t * obj = lv_obj_create(cont);
lv_obj_set_size(obj, 70, LV_SIZE_CONTENT);
lv_obj_t * label = lv_label_create(obj);
lv_label_set_text_fmt(label, "%u", i);
lv_label_set_text_fmt(label, "%"LV_PRIu32, i);
lv_obj_center(label);
}

View File

@@ -13,13 +13,13 @@ void lv_example_flex_6(void)
lv_obj_center(cont);
lv_obj_set_flex_flow(cont, LV_FLEX_FLOW_ROW_WRAP);
unsigned int i;
uint32_t i;
for(i = 0; i < 20; i++) {
lv_obj_t * obj = lv_obj_create(cont);
lv_obj_set_size(obj, 70, LV_SIZE_CONTENT);
lv_obj_t * label = lv_label_create(obj);
lv_label_set_text_fmt(label, "%u", i);
lv_label_set_text_fmt(label, "%"LV_PRIu32, i);
lv_obj_center(label);
}
}