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

Merge pull request #1315 from xennex22/dev-7.0

Minor fixes for compiler
This commit is contained in:
Gabor Kiss-Vamosi 2019-12-16 18:51:50 +01:00 committed by GitHub
commit fdd4a427f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 8 additions and 13 deletions

View File

@ -442,7 +442,7 @@ lv_group_user_data_t * lv_group_get_user_data(lv_group_t * group)
*/ */
lv_group_style_mod_cb_t lv_group_get_style_mod_cb(const lv_group_t * group) lv_group_style_mod_cb_t lv_group_get_style_mod_cb(const lv_group_t * group)
{ {
if(!group) return false; if(!group) return NULL;
return group->style_mod_cb; return group->style_mod_cb;
} }
@ -453,7 +453,7 @@ lv_group_style_mod_cb_t lv_group_get_style_mod_cb(const lv_group_t * group)
*/ */
lv_group_style_mod_cb_t lv_group_get_style_mod_edit_cb(const lv_group_t * group) lv_group_style_mod_cb_t lv_group_get_style_mod_edit_cb(const lv_group_t * group)
{ {
if(!group) return false; if(!group) return NULL;
return group->style_mod_edit_cb; return group->style_mod_edit_cb;
} }
@ -464,7 +464,7 @@ lv_group_style_mod_cb_t lv_group_get_style_mod_edit_cb(const lv_group_t * group)
*/ */
lv_group_focus_cb_t lv_group_get_focus_cb(const lv_group_t * group) lv_group_focus_cb_t lv_group_get_focus_cb(const lv_group_t * group)
{ {
if(!group) return false; if(!group) return NULL;
return group->focus_cb; return group->focus_cb;
} }

View File

@ -39,7 +39,6 @@ static void indev_button_proc(lv_indev_t * i, lv_indev_data_t * data);
static void indev_proc_press(lv_indev_proc_t * proc); static void indev_proc_press(lv_indev_proc_t * proc);
static void indev_proc_release(lv_indev_proc_t * proc); static void indev_proc_release(lv_indev_proc_t * proc);
static void indev_proc_reset_query_handler(lv_indev_t * indev); static void indev_proc_reset_query_handler(lv_indev_t * indev);
static lv_obj_t * indev_search_obj(const lv_indev_proc_t * proc, lv_obj_t * obj);
static void indev_drag(lv_indev_proc_t * proc); static void indev_drag(lv_indev_proc_t * proc);
static void indev_drag_throw(lv_indev_proc_t * proc); static void indev_drag_throw(lv_indev_proc_t * proc);
static lv_obj_t * get_dragged_obj(lv_obj_t * obj); static lv_obj_t * get_dragged_obj(lv_obj_t * obj);

View File

@ -136,7 +136,6 @@ void * lv_ll_ins_tail(lv_ll_t * ll_p)
lv_ll_node_t * n_new; lv_ll_node_t * n_new;
n_new = lv_mem_alloc(ll_p->n_size + LL_NODE_META_SIZE); n_new = lv_mem_alloc(ll_p->n_size + LL_NODE_META_SIZE);
if(n_new == NULL) return NULL;
if(n_new != NULL) { if(n_new != NULL) {
node_set_next(ll_p, n_new, NULL); /*No next after the new tail*/ node_set_next(ll_p, n_new, NULL); /*No next after the new tail*/

View File

@ -188,8 +188,6 @@ lv_chart_series_t * lv_chart_add_series(lv_obj_t * chart, lv_color_t color)
lv_coord_t def = LV_CHART_POINT_DEF; lv_coord_t def = LV_CHART_POINT_DEF;
if(ser == NULL) return NULL;
ser->color = color; ser->color = color;
ser->points = lv_mem_alloc(sizeof(lv_coord_t) * ext->point_cnt); ser->points = lv_mem_alloc(sizeof(lv_coord_t) * ext->point_cnt);
LV_ASSERT_MEM(ser->points); LV_ASSERT_MEM(ser->points);
@ -933,7 +931,6 @@ static void lv_chart_draw_points(lv_obj_t * chart, const lv_area_t * mask)
lv_style_copy(&style_point, &lv_style_plain); lv_style_copy(&style_point, &lv_style_plain);
style_point.body.border.width = 0; style_point.body.border.width = 0;
style_point.body.radius = LV_RADIUS_CIRCLE;
style_point.body.opa = ext->series.opa; style_point.body.opa = ext->series.opa;
style_point.body.radius = ext->series.width; style_point.body.radius = ext->series.width;

View File

@ -36,7 +36,7 @@ static void lv_kb_updatemap(lv_obj_t * kb);
**********************/ **********************/
static lv_signal_cb_t ancestor_signal; static lv_signal_cb_t ancestor_signal;
/* clang-format off */ /* clang-format off */
static const char * default_kb_map_lc[] = {"1#", "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", LV_SYMBOL_BACKSPACE, "\n", static const char * const default_kb_map_lc[] = {"1#", "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", LV_SYMBOL_BACKSPACE, "\n",
"ABC", "a", "s", "d", "f", "g", "h", "j", "k", "l", LV_SYMBOL_NEW_LINE, "\n", "ABC", "a", "s", "d", "f", "g", "h", "j", "k", "l", LV_SYMBOL_NEW_LINE, "\n",
"_", "-", "z", "x", "c", "v", "b", "n", "m", ".", ",", ":", "\n", "_", "-", "z", "x", "c", "v", "b", "n", "m", ".", ",", ":", "\n",
LV_SYMBOL_CLOSE, LV_SYMBOL_LEFT, " ", LV_SYMBOL_RIGHT, LV_SYMBOL_OK, ""}; LV_SYMBOL_CLOSE, LV_SYMBOL_LEFT, " ", LV_SYMBOL_RIGHT, LV_SYMBOL_OK, ""};
@ -47,7 +47,7 @@ static const lv_btnm_ctrl_t default_kb_ctrl_lc_map[] = {
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
LV_KB_CTRL_BTN_FLAGS | 2, 2, 6, 2, LV_KB_CTRL_BTN_FLAGS | 2}; LV_KB_CTRL_BTN_FLAGS | 2, 2, 6, 2, LV_KB_CTRL_BTN_FLAGS | 2};
static const char * default_kb_map_uc[] = {"1#", "Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P", LV_SYMBOL_BACKSPACE, "\n", static const char * const default_kb_map_uc[] = {"1#", "Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P", LV_SYMBOL_BACKSPACE, "\n",
"abc", "A", "S", "D", "F", "G", "H", "J", "K", "L", LV_SYMBOL_NEW_LINE, "\n", "abc", "A", "S", "D", "F", "G", "H", "J", "K", "L", LV_SYMBOL_NEW_LINE, "\n",
"_", "-", "Z", "X", "C", "V", "B", "N", "M", ".", ",", ":", "\n", "_", "-", "Z", "X", "C", "V", "B", "N", "M", ".", ",", ":", "\n",
LV_SYMBOL_CLOSE, LV_SYMBOL_LEFT, " ", LV_SYMBOL_RIGHT, LV_SYMBOL_OK, ""}; LV_SYMBOL_CLOSE, LV_SYMBOL_LEFT, " ", LV_SYMBOL_RIGHT, LV_SYMBOL_OK, ""};
@ -58,7 +58,7 @@ static const lv_btnm_ctrl_t default_kb_ctrl_uc_map[] = {
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
LV_KB_CTRL_BTN_FLAGS | 2, 2, 6, 2, LV_KB_CTRL_BTN_FLAGS | 2}; LV_KB_CTRL_BTN_FLAGS | 2, 2, 6, 2, LV_KB_CTRL_BTN_FLAGS | 2};
static const char * default_kb_map_spec[] = {"0", "1", "2", "3", "4" ,"5", "6", "7", "8", "9", "Bksp", "\n", static const char * const default_kb_map_spec[] = {"0", "1", "2", "3", "4" ,"5", "6", "7", "8", "9", LV_SYMBOL_BACKSPACE, "\n",
"abc", "+", "-", "/", "*", "=", "%", "!", "?", "#", "<", ">", "\n", "abc", "+", "-", "/", "*", "=", "%", "!", "?", "#", "<", ">", "\n",
"\\", "@", "$", "(", ")", "{", "}", "[", "]", ";", "\"", "'", "\n", "\\", "@", "$", "(", ")", "{", "}", "[", "]", ";", "\"", "'", "\n",
LV_SYMBOL_CLOSE, LV_SYMBOL_LEFT, " ", LV_SYMBOL_RIGHT, LV_SYMBOL_OK, ""}; LV_SYMBOL_CLOSE, LV_SYMBOL_LEFT, " ", LV_SYMBOL_RIGHT, LV_SYMBOL_OK, ""};

View File

@ -33,7 +33,7 @@
static lv_design_res_t lv_slider_design(lv_obj_t * slider, const lv_area_t * clip_area, lv_design_mode_t mode); static lv_design_res_t lv_slider_design(lv_obj_t * slider, const lv_area_t * clip_area, lv_design_mode_t mode);
static lv_res_t lv_slider_signal(lv_obj_t * slider, lv_signal_t sign, void * param); static lv_res_t lv_slider_signal(lv_obj_t * slider, lv_signal_t sign, void * param);
static void lv_slider_position_knob(lv_obj_t * slider, lv_area_t * knob_area, lv_coord_t knob_size, bool hor); static void lv_slider_position_knob(lv_obj_t * slider, lv_area_t * knob_area, lv_coord_t knob_size, bool hor);
static void lv_slider_draw_knob(lv_obj_t * slider, lv_area_t * knob_area, lv_area_t * clip_area); static void lv_slider_draw_knob(lv_obj_t * slider, const lv_area_t * knob_area, const lv_area_t * clip_area);
/********************** /**********************
* STATIC VARIABLES * STATIC VARIABLES
@ -491,7 +491,7 @@ static void lv_slider_position_knob(lv_obj_t * slider, lv_area_t * knob_area, lv
knob_area->y2 += style_knob->body.padding.bottom; knob_area->y2 += style_knob->body.padding.bottom;
} }
static void lv_slider_draw_knob(lv_obj_t * slider, lv_area_t * knob_area, lv_area_t * clip_area) { static void lv_slider_draw_knob(lv_obj_t * slider, const lv_area_t * knob_area, const lv_area_t * clip_area) {
lv_slider_ext_t * ext = lv_obj_get_ext_attr(slider); lv_slider_ext_t * ext = lv_obj_get_ext_attr(slider);
const lv_style_t * style_knob = lv_slider_get_style(slider, LV_SLIDER_STYLE_KNOB); const lv_style_t * style_knob = lv_slider_get_style(slider, LV_SLIDER_STYLE_KNOB);
lv_opa_t opa_scale = lv_obj_get_opa_scale(slider); lv_opa_t opa_scale = lv_obj_get_opa_scale(slider);