fix(printf) add (int) casts to log messages to avoid warnings on %d
This commit is contained in:
@@ -11,7 +11,7 @@ static void float_btn_event_cb(lv_event_t * e)
|
||||
if(code == LV_EVENT_CLICKED) {
|
||||
lv_obj_t * list = lv_event_get_user_data(e);
|
||||
char buf[32];
|
||||
lv_snprintf(buf, sizeof(buf), "Track %d", btn_cnt);
|
||||
lv_snprintf(buf, sizeof(buf), "Track %d", (int)btn_cnt);
|
||||
lv_obj_t * list_btn = lv_list_add_btn(list, LV_SYMBOL_AUDIO, buf);
|
||||
btn_cnt++;
|
||||
|
||||
@@ -32,7 +32,7 @@ void lv_example_scroll_3(void)
|
||||
|
||||
for(btn_cnt = 1; btn_cnt <= 2; btn_cnt++) {
|
||||
char buf[32];
|
||||
lv_snprintf(buf, sizeof(buf), "Track %d", btn_cnt);
|
||||
lv_snprintf(buf, sizeof(buf), "Track %d", (int)btn_cnt);
|
||||
lv_list_add_btn(list, LV_SYMBOL_AUDIO, buf);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user