fix(printf) add (int) casts to log messages to avoid warnings on %d

This commit is contained in:
Gabor Kiss-Vamosi
2021-11-03 11:52:56 +01:00
parent 63ff80192b
commit d9d3f27126
10 changed files with 13 additions and 13 deletions

View File

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