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

solve warnings listed in #1292

This commit is contained in:
Gabor Kiss-Vamosi 2019-12-03 06:56:48 +01:00
parent 64df282c81
commit 6e97c07588
7 changed files with 34 additions and 19 deletions

View File

@ -51,7 +51,7 @@ static void map_blended(const lv_area_t * disp_area, lv_color_t * disp_buf, con
const lv_area_t * map_area, const lv_color_t * map_buf, lv_opa_t opa,
const lv_opa_t * mask, lv_draw_mask_res_t mask_res, lv_blend_mode_t mode);
static inline lv_color_t color_blend_true_color_additive(lv_color_t bg, lv_color_t fg, lv_opa_t opa);
static inline lv_color_t color_blend_true_color_additive(lv_color_t fg, lv_color_t bg, lv_opa_t opa);
static inline lv_color_t color_blend_true_color_subtractive(lv_color_t fg, lv_color_t bg, lv_opa_t opa);
/**********************

View File

@ -65,6 +65,8 @@ void lv_task_core_init(void)
*/
LV_ATTRIBUTE_TASK_HANDLER void lv_task_handler(void)
{
LV_LOG_TRACE("lv_task_handler started");
/*Avoid concurrent running of the task handler*/

View File

@ -384,18 +384,20 @@ const lv_style_t * lv_cpicker_get_style(const lv_obj_t * cpicker, lv_cpicker_sty
LV_ASSERT_OBJ(cpicker, LV_OBJX_NAME);
lv_cpicker_ext_t * ext = lv_obj_get_ext_attr(cpicker);
const lv_style_t * style;
switch(type) {
case LV_CPICKER_STYLE_MAIN:
return lv_obj_get_style(cpicker);
style = lv_obj_get_style(cpicker);
break;
case LV_CPICKER_STYLE_INDICATOR:
return ext->indic.style;
style = ext->indic.style;
break;
default:
return NULL;
style = NULL;
}
/*To avoid warning*/
return NULL;
return style;
}
/**

View File

@ -456,16 +456,23 @@ const lv_style_t * lv_ddlist_get_style(const lv_obj_t * ddlist, lv_ddlist_style_
LV_ASSERT_OBJ(ddlist, LV_OBJX_NAME);
lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist);
const lv_style_t * style;
switch(type) {
case LV_DDLIST_STYLE_BG: return lv_page_get_style(ddlist, LV_PAGE_STYLE_BG);
case LV_DDLIST_STYLE_SB: return lv_page_get_style(ddlist, LV_PAGE_STYLE_SB);
case LV_DDLIST_STYLE_SEL: return ext->sel_style;
default: return NULL;
case LV_DDLIST_STYLE_BG:
style = lv_page_get_style(ddlist, LV_PAGE_STYLE_BG);
break;
case LV_DDLIST_STYLE_SB:
style = lv_page_get_style(ddlist, LV_PAGE_STYLE_SB);
break;
case LV_DDLIST_STYLE_SEL:
style = ext->sel_style;
break;
default:
style = NULL;
}
/*To avoid warning*/
return NULL;
return style;
}
lv_label_align_t lv_ddlist_get_align(const lv_obj_t * ddlist)

View File

@ -246,7 +246,7 @@ static lv_design_res_t lv_line_design(lv_obj_t * line, const lv_area_t * clip_ar
}
lv_area_t circle_area;
lv_coord_t r = (style->line.width >> 1);
lv_coord_t r_corr = style->line.width & 1 ? 0 : 1;
lv_coord_t r_corr = (style->line.width & 1) ? 0 : 1;
/*Read all points and draw the lines*/
for(i = 0; i < ext->point_num - 1; i++) {

View File

@ -310,14 +310,19 @@ const lv_style_t * lv_roller_get_style(const lv_obj_t * roller, lv_roller_style_
{
LV_ASSERT_OBJ(roller, LV_OBJX_NAME);
const lv_style_t * style;
switch(type) {
case LV_ROLLER_STYLE_BG: return lv_obj_get_style(roller);
case LV_ROLLER_STYLE_SEL: return lv_ddlist_get_style(roller, LV_DDLIST_STYLE_SEL);
default: return NULL;
case LV_ROLLER_STYLE_BG:
style = lv_obj_get_style(roller);
break;
case LV_ROLLER_STYLE_SEL:
style = lv_ddlist_get_style(roller, LV_DDLIST_STYLE_SEL);
break;
default:
style = NULL;
}
/*To avoid warning*/
return NULL;
return style;
}
/**********************

View File

@ -681,7 +681,6 @@ static void tabview_init(void)
indic.body.radius = 0;
indic.body.border.width = 0;
indic.body.padding.inner = LV_DPI / 20;
indic.body.padding.inner = LV_DPI / 20;
lv_style_copy(&btn_bg, &def);
btn_bg.body.main_color = lv_color_hex3(0xccc);