chore: fix compile warnings (#6817)

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
This commit is contained in:
Neo Xu
2024-09-30 20:58:57 +08:00
committed by GitHub
parent 0458acd998
commit 2601a26c7f
7 changed files with 13 additions and 13 deletions

View File

@@ -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)

View File

@@ -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");
}
}

View File

@@ -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();
}
}