chore: replace (void)xxx with LV_UNUSED(xxx) (#2779)
and remove the redundant inclusion Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
@@ -454,7 +454,7 @@ lv_res_t lv_img_decoder_built_in_open(lv_img_decoder_t * decoder, lv_img_decoder
|
||||
lv_res_t lv_img_decoder_built_in_read_line(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc, lv_coord_t x,
|
||||
lv_coord_t y, lv_coord_t len, uint8_t * buf)
|
||||
{
|
||||
(void)decoder; /*Unused*/
|
||||
LV_UNUSED(decoder); /*Unused*/
|
||||
|
||||
lv_res_t res = LV_RES_INV;
|
||||
|
||||
@@ -489,7 +489,7 @@ lv_res_t lv_img_decoder_built_in_read_line(lv_img_decoder_t * decoder, lv_img_de
|
||||
*/
|
||||
void lv_img_decoder_built_in_close(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc)
|
||||
{
|
||||
(void)decoder; /*Unused*/
|
||||
LV_UNUSED(decoder); /*Unused*/
|
||||
|
||||
lv_img_decoder_built_in_data_t * user_data = dsc->user_data;
|
||||
if(user_data) {
|
||||
|
||||
@@ -16,7 +16,6 @@ extern "C" {
|
||||
#include "../lv_conf_internal.h"
|
||||
#include "lv_log.h"
|
||||
#include "lv_mem.h"
|
||||
#include <stdbool.h>
|
||||
#include LV_ASSERT_HANDLER_INCLUDE
|
||||
|
||||
/*********************
|
||||
@@ -41,7 +40,7 @@ extern "C" {
|
||||
LV_LOG_ERROR("Asserted at expression: %s", #expr); \
|
||||
LV_ASSERT_HANDLER \
|
||||
} \
|
||||
} while (0)
|
||||
} while(0)
|
||||
|
||||
#define LV_ASSERT_MSG(expr, msg) \
|
||||
do { \
|
||||
@@ -49,7 +48,7 @@ extern "C" {
|
||||
LV_LOG_ERROR("Asserted at expression: %s (%s)", #expr, msg); \
|
||||
LV_ASSERT_HANDLER \
|
||||
} \
|
||||
} while (0)
|
||||
} while(0)
|
||||
|
||||
/*-----------------
|
||||
* ASSERTS
|
||||
|
||||
@@ -252,8 +252,8 @@ void lv_label_set_text_sel_end(lv_obj_t * obj, uint32_t index)
|
||||
label->sel_end = index;
|
||||
lv_obj_invalidate(obj);
|
||||
#else
|
||||
(void)obj; /*Unused*/
|
||||
(void)index; /*Unused*/
|
||||
LV_UNUSED(obj); /*Unused*/
|
||||
LV_UNUSED(index); /*Unused*/
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -613,7 +613,7 @@ uint32_t lv_label_get_text_selection_start(const lv_obj_t * obj)
|
||||
return label->sel_start;
|
||||
|
||||
#else
|
||||
(void)obj; /*Unused*/
|
||||
LV_UNUSED(obj); /*Unused*/
|
||||
return LV_LABEL_TEXT_SELECTION_OFF;
|
||||
#endif
|
||||
}
|
||||
@@ -626,7 +626,7 @@ uint32_t lv_label_get_text_selection_end(const lv_obj_t * obj)
|
||||
lv_label_t * label = (lv_label_t *)obj;
|
||||
return label->sel_end;
|
||||
#else
|
||||
(void)obj; /*Unused*/
|
||||
LV_UNUSED(obj); /*Unused*/
|
||||
return LV_LABEL_TEXT_SELECTION_OFF;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -537,8 +537,8 @@ void lv_textarea_set_text_selection(lv_obj_t * obj, bool en)
|
||||
|
||||
if(!en) lv_textarea_clear_selection(obj);
|
||||
#else
|
||||
(void)obj; /*Unused*/
|
||||
(void)en; /*Unused*/
|
||||
LV_UNUSED(obj); /*Unused*/
|
||||
LV_UNUSED(en); /*Unused*/
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -671,7 +671,7 @@ bool lv_textarea_text_is_selected(const lv_obj_t * obj)
|
||||
return false;
|
||||
}
|
||||
#else
|
||||
(void)obj; /*Unused*/
|
||||
LV_UNUSED(obj); /*Unused*/
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
@@ -684,7 +684,7 @@ bool lv_textarea_get_text_selection(lv_obj_t * obj)
|
||||
lv_textarea_t * ta = (lv_textarea_t *)obj;
|
||||
return ta->text_sel_en;
|
||||
#else
|
||||
(void)obj; /*Unused*/
|
||||
LV_UNUSED(obj); /*Unused*/
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user