chore: fix compile warnings (#6975)

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
This commit is contained in:
Neo Xu
2024-10-06 11:18:57 +08:00
committed by GitHub
parent fa69216d4c
commit af4452ef41
4 changed files with 10 additions and 10 deletions

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