chore: fix compile warnings (#6817)
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
This commit is contained in:
@@ -8,7 +8,7 @@ static void short_click_event_cb(lv_event_t * e)
|
||||
lv_obj_t * info_label = lv_event_get_user_data(e);
|
||||
lv_indev_t * indev = lv_event_get_param(e);
|
||||
uint8_t cnt = lv_indev_get_short_click_streak(indev);
|
||||
lv_label_set_text_fmt(info_label, "Short click streak: %"LV_PRIu32, cnt);
|
||||
lv_label_set_text_fmt(info_label, "Short click streak: %u", cnt);
|
||||
}
|
||||
|
||||
static void streak_event_cb(lv_event_t * e)
|
||||
|
||||
@@ -128,10 +128,10 @@ static void time_observer_cb(lv_observer_t * observer, lv_subject_t * subject)
|
||||
lv_obj_t * label = lv_observer_get_target(observer);
|
||||
|
||||
if(format == TIME_FORMAT_24) {
|
||||
lv_label_set_text_fmt(label, "%d:%02d", hour, minute);
|
||||
lv_label_set_text_fmt(label, "%" LV_PRId32 ":%02" LV_PRId32, hour, minute);
|
||||
}
|
||||
else {
|
||||
lv_label_set_text_fmt(label, "%d:%02d %s", hour + 1, minute, am_pm == TIME_AM ? "am" : "pm");
|
||||
lv_label_set_text_fmt(label, "%"LV_PRId32":%02"LV_PRId32" %s", hour + 1, minute, am_pm == TIME_AM ? "am" : "pm");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ static void increment_thread_entry(void * user_data)
|
||||
lv_lock();
|
||||
counter_label = lv_label_create(lv_scr_act());
|
||||
lv_obj_align(counter_label, LV_ALIGN_CENTER, 0, 0);
|
||||
lv_label_set_text_fmt(counter_label, "Pressed %u times", press_count);
|
||||
lv_label_set_text_fmt(counter_label, "Pressed %" LV_PRIu32 " times", press_count);
|
||||
lv_unlock();
|
||||
|
||||
while(true) {
|
||||
@@ -86,7 +86,7 @@ static void increment_thread_entry(void * user_data)
|
||||
press_count += 1;
|
||||
|
||||
lv_lock();
|
||||
lv_label_set_text_fmt(counter_label, "Pressed %u times", press_count);
|
||||
lv_label_set_text_fmt(counter_label, "Pressed %" LV_PRIu32 " times", press_count);
|
||||
lv_unlock();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user