chore: fix warning when log disable (#5018)

Signed-off-by: FASTSHIFT <vifextech@foxmail.com>
This commit is contained in:
_VIFEXTech
2023-12-15 23:03:08 +08:00
committed by GitHub
parent 9264b50c18
commit 6bdadad1f3
4 changed files with 4 additions and 1 deletions

View File

@@ -30,6 +30,7 @@ static void engine_state_observer_cb(lv_observer_t * observer, lv_subject_t * su
LV_UNUSED(observer); LV_UNUSED(observer);
int32_t v = lv_subject_get_int(subject); int32_t v = lv_subject_get_int(subject);
LV_UNUSED(v);
/*In a real application set/clear a pin here*/ /*In a real application set/clear a pin here*/
LV_LOG_USER("Engine state: %d", v); LV_LOG_USER("Engine state: %d", v);
} }

View File

@@ -5,6 +5,7 @@ static void event_cb(lv_event_t * e)
{ {
lv_obj_t * btn = lv_event_get_target(e); lv_obj_t * btn = lv_event_get_target(e);
lv_obj_t * label = lv_obj_get_child(btn, 0); lv_obj_t * label = lv_obj_get_child(btn, 0);
LV_UNUSED(label);
LV_LOG_USER("Button %s clicked", lv_label_get_text(label)); LV_LOG_USER("Button %s clicked", lv_label_get_text(label));
} }

View File

@@ -120,7 +120,7 @@ typedef struct _lv_global_t {
lv_log_print_g_cb_t custom_log_print_cb; lv_log_print_g_cb_t custom_log_print_cb;
#endif #endif
#if LV_LOG_USE_TIMESTAMP #if LV_USE_LOG && LV_LOG_USE_TIMESTAMP
uint32_t log_last_log_time; uint32_t log_last_log_time;
#endif #endif

View File

@@ -926,6 +926,7 @@ static lv_result_t decompress_image(lv_image_decoder_dsc_t * dsc, const lv_image
uint8_t * img_data; uint8_t * img_data;
uint32_t input_len = compressed->compressed_size; uint32_t input_len = compressed->compressed_size;
LV_UNUSED(input_len);
uint32_t out_len = compressed->decompressed_size; uint32_t out_len = compressed->decompressed_size;
lv_draw_buf_t * decompressed = lv_draw_buf_create(dsc->header.w, dsc->header.h, dsc->header.cf, lv_draw_buf_t * decompressed = lv_draw_buf_create(dsc->header.w, dsc->header.h, dsc->header.cf,