1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-14 06:42:58 +08:00

Fix warnings reported in #1008

This commit is contained in:
Themba Dube 2019-04-09 16:18:04 -04:00
parent 5edb1dd38a
commit ea7c82f478
3 changed files with 5 additions and 8 deletions

View File

@ -99,10 +99,8 @@ void lv_init(void)
lv_ll_init(&LV_GC_ROOT(_lv_disp_ll), sizeof(lv_disp_t));
lv_ll_init(&LV_GC_ROOT(_lv_indev_ll), sizeof(lv_indev_t));
#if LV_INDEV_READ_PERIOD != 0
/*Init the input device handling*/
lv_indev_init();
#endif
lv_initialized = true;
LV_LOG_INFO("lv_init ready");

View File

@ -436,8 +436,8 @@ static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_
#if LV_ANTIALIAS
/*Shift the anti aliasing on the edges (-1, 1 or 0 (zero only in case width == 0))*/
lv_coord_t aa_shift1;
lv_coord_t aa_shift2;
lv_coord_t aa_shift1 = 0;
lv_coord_t aa_shift2 = 0;
if(aa) {
if(main_line->hor == false) {
if(main_line->sx < 0) {

View File

@ -651,10 +651,11 @@ static void refr_position(lv_obj_t * roller, bool anim_en)
/**
* Set the middle page for the roller if inifinte is enabled
* @param roller_scrl pointer to the roller's scrollable
* @param scrl pointer to the roller's scrollable (lv_obj_t *)
*/
static void inf_normalize(void * roller_scrl)
static void inf_normalize(void * scrl)
{
lv_obj_t * roller_scrl= (lv_obj_t *)scrl;
lv_obj_t * roller = lv_obj_get_parent(roller_scrl);
lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller);
@ -667,8 +668,6 @@ static void inf_normalize(void * roller_scrl)
(LV_ROLLER_INF_PAGES / 2) * real_id_cnt; /*Select the middle page*/
/*Move to the new id*/
lv_obj_t * roller_scrl = lv_page_get_scrl(roller);
lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller);
lv_style_t * style_label = lv_obj_get_style(ext->ddlist.label);
const lv_font_t * font = style_label->text.font;
lv_coord_t font_h = lv_font_get_height(font);