From 00517116ccc370c442d52c5e7d4cf8961907e540 Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Thu, 14 Nov 2019 21:08:23 -0500 Subject: [PATCH] Fix some warnings --- src/lv_draw/lv_draw_blend.c | 1 - src/lv_draw/lv_img_buf.c | 6 +++--- src/lv_objx/lv_img.h | 4 ++-- src/lv_objx/lv_objmask.c | 4 ++-- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/lv_draw/lv_draw_blend.c b/src/lv_draw/lv_draw_blend.c index c9be96007..90822ea10 100644 --- a/src/lv_draw/lv_draw_blend.c +++ b/src/lv_draw/lv_draw_blend.c @@ -574,7 +574,6 @@ static void map_normal(const lv_area_t * disp_area, lv_color_t * disp_buf, cons /*Buffer the result color to avoid recalculating the same color*/ lv_color_t res_color; - lv_opa_t last_mask = LV_OPA_TRANSP; res_color.full = disp_buf_tmp[0].full; /*Only the mask matters*/ diff --git a/src/lv_draw/lv_img_buf.c b/src/lv_draw/lv_img_buf.c index 0b65e684e..ec698a584 100644 --- a/src/lv_draw/lv_img_buf.c +++ b/src/lv_draw/lv_img_buf.c @@ -547,9 +547,9 @@ static inline bool transform_anti_alias(lv_img_transform_dsc_t * dsc) lv_color_t c11; lv_opa_t a00 = dsc->res.opa; - lv_opa_t a10; - lv_opa_t a01; - lv_opa_t a11; + lv_opa_t a10 = 0; + lv_opa_t a01 = 0; + lv_opa_t a11 = 0; if(dsc->tmp.native_color) { memcpy(&c01, &src_u8[dsc->tmp.pxi + dsc->tmp.px_size * xn], sizeof(lv_color_t)); diff --git a/src/lv_objx/lv_img.h b/src/lv_objx/lv_img.h index d9a308e2f..715682706 100644 --- a/src/lv_objx/lv_img.h +++ b/src/lv_objx/lv_img.h @@ -128,7 +128,7 @@ void lv_img_set_zoom(lv_obj_t * img, uint16_t zoom); * @param img pointer to an image object * @param antialias true: anti-aliased; false: not anti-aliased */ -void lv_img_set_antialais(lv_obj_t * img, bool antialias); +void lv_img_set_antialias(lv_obj_t * img, bool antialias); /** * Set the style of an image @@ -200,7 +200,7 @@ uint16_t lv_img_get_zoom(lv_obj_t * img); * @param img pointer to an image object * @return true: anti-aliased; false: not anti-aliased */ -bool lv_img_get_antialais(lv_obj_t * img); +bool lv_img_get_antialias(lv_obj_t * img); /** * Get the style of an image object diff --git a/src/lv_objx/lv_objmask.c b/src/lv_objx/lv_objmask.c index 4a1ea28c7..6a124ed8f 100644 --- a/src/lv_objx/lv_objmask.c +++ b/src/lv_objx/lv_objmask.c @@ -76,9 +76,9 @@ lv_obj_t * lv_objmask_create(lv_obj_t * par, const lv_obj_t * copy) lv_objmask_set_style(new_objmask, LV_OBJMASK_STYLE_BG, &lv_style_transp); } - /*Copy an existing object mask*/ + /*TODO: Copy an existing object mask*/ else { - lv_objmask_ext_t * copy_ext = lv_obj_get_ext_attr(copy); + /* lv_objmask_ext_t * copy_ext = lv_obj_get_ext_attr(copy); */ /*Refresh the style with new signal function*/ lv_obj_refresh_style(new_objmask);