mirror of
https://github.com/lvgl/lvgl.git
synced 2025-02-04 07:13:00 +08:00
chore: fix compile warnings (#6975)
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
This commit is contained in:
parent
fa69216d4c
commit
af4452ef41
@ -591,7 +591,7 @@ static void summary_create(void)
|
||||
lv_table_set_cell_value(table, 0, 3, "Avg. time (render + flush)");
|
||||
|
||||
/* csv log */
|
||||
LV_LOG("Benchmark Summary (%"LV_PRIu32".%"LV_PRIu32".%"LV_PRIu32" %s)\r\n",
|
||||
LV_LOG("Benchmark Summary (%d.%d.%d %s)\r\n",
|
||||
LVGL_VERSION_MAJOR,
|
||||
LVGL_VERSION_MINOR,
|
||||
LVGL_VERSION_PATCH,
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ typedef lv_result_t (*lv_property_getter_t)(const lv_obj_t *, lv_prop_id_t, lv_p
|
||||
**********************/
|
||||
|
||||
static lv_result_t obj_property(lv_obj_t * obj, lv_prop_id_t id, lv_property_t * value, bool set);
|
||||
static int32_t property_name_compare(const void * ref, const void * element);
|
||||
static int property_name_compare(const void * ref, const void * element);
|
||||
|
||||
/**********************
|
||||
* STATIC VARIABLES
|
||||
@ -121,7 +121,7 @@ lv_property_t lv_obj_get_style_property(lv_obj_t * obj, lv_prop_id_t id, uint32_
|
||||
uint32_t index = LV_PROPERTY_ID_INDEX(id);
|
||||
|
||||
if(index == LV_PROPERTY_ID_INVALID || index >= LV_PROPERTY_ID_START) {
|
||||
LV_LOG_WARN("invalid style property id %d", id);
|
||||
LV_LOG_WARN("invalid style property id 0x%" LV_PRIx32, id);
|
||||
value.id = LV_PROPERTY_ID_INVALID;
|
||||
value.num = 0;
|
||||
return value;
|
||||
@ -232,7 +232,7 @@ static lv_result_t obj_property(lv_obj_t * obj, lv_prop_id_t id, lv_property_t *
|
||||
|
||||
/*id matched but we got null pointer to functions*/
|
||||
if(set ? prop->setter == NULL : prop->getter == NULL) {
|
||||
LV_LOG_WARN("NULL %s provided, id: %d", set ? "setter" : "getter", id);
|
||||
LV_LOG_WARN("NULL %s provided, id: 0x%" LV_PRIx32, set ? "setter" : "getter", id);
|
||||
return LV_RESULT_INVALID;
|
||||
}
|
||||
|
||||
@ -278,7 +278,7 @@ static lv_result_t obj_property(lv_obj_t * obj, lv_prop_id_t id, lv_property_t *
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
LV_LOG_WARN("Unknown property id: 0x%08x", prop->id);
|
||||
LV_LOG_WARN("Unknown property id: 0x%08" LV_PRIx32, prop->id);
|
||||
return LV_RESULT_INVALID;
|
||||
}
|
||||
}
|
||||
@ -289,7 +289,7 @@ static lv_result_t obj_property(lv_obj_t * obj, lv_prop_id_t id, lv_property_t *
|
||||
/*If no setter found, try base class then*/
|
||||
}
|
||||
|
||||
LV_LOG_WARN("Unknown property id: 0x%08x", id);
|
||||
LV_LOG_WARN("Unknown property id: 0x%08" LV_PRIx32, id);
|
||||
return LV_RESULT_INVALID;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user