1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-28 07:03:00 +08:00

fix warnings

This commit is contained in:
Gabor Kiss-Vamosi 2020-04-14 11:06:56 +02:00
parent 6563f2fa0d
commit 742eb4f6c8
5 changed files with 16 additions and 10 deletions

View File

@ -2882,7 +2882,6 @@ void lv_obj_set_user_data(lv_obj_t * obj, lv_obj_user_data_t data)
}
#endif
#if LV_USE_GROUP
/**
* Get the group of the object
* @param obj pointer to an object
@ -2892,7 +2891,11 @@ void * lv_obj_get_group(const lv_obj_t * obj)
{
LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
#if LV_USE_GROUP
return obj->group_p;
#else
return NULL;
#endif
}
/**
@ -2904,13 +2907,15 @@ bool lv_obj_is_focused(const lv_obj_t * obj)
{
LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
#if LV_USE_GROUP
if(obj->group_p) {
if(lv_group_get_focused(obj->group_p) == obj) return true;
}
return false;
}
#else
return false;
#endif
}
/*-------------------

View File

@ -1383,7 +1383,6 @@ void lv_obj_set_user_data(lv_obj_t * obj, lv_obj_user_data_t data);
#endif
#if LV_USE_GROUP
/**
* Get the group of the object
* @param obj pointer to an object
@ -1398,8 +1397,6 @@ void * lv_obj_get_group(const lv_obj_t * obj);
*/
bool lv_obj_is_focused(const lv_obj_t * obj);
#endif
/*-------------------
* OTHER FUNCTIONS
*------------------*/

View File

@ -243,6 +243,13 @@ lv_coord_t lv_disp_get_ver_res(lv_disp_t * disp);
*/
bool lv_disp_get_antialiasing(lv_disp_t * disp);
/**
* Get the DPI of the display
* @param disp pointer to a display (NULL to use the default display)
* @return dpi of the display
*/
uint32_t lv_disp_get_dpi(lv_disp_t * disp);
/**
* Get the size category of the display based on it's hor. res. and dpi.
* @param disp pointer to a display (NULL to use the default display)

View File

@ -160,7 +160,6 @@ void * lv_mem_alloc(size_t size)
#endif
void * alloc = NULL;
printf("alloc: %d\n", size);
#if LV_MEM_CUSTOM == 0
/*Use the built-in allocators*/
lv_mem_ent_t * e = NULL;
@ -786,7 +785,6 @@ static lv_mem_ent_t * ent_get_next(lv_mem_ent_t * act_e)
static void * ent_alloc(lv_mem_ent_t * e, size_t size)
{
void * alloc = NULL;
printf("%s, size:%d\n", e->header.s.used == 0 ? "free" : "used", e->header.s.d_size);
/*If the memory is free and big enough then use it */
if(e->header.s.used == 0 && e->header.s.d_size >= size) {
/*Truncate the entry to the desired size */

View File

@ -243,7 +243,7 @@ lv_fit_t lv_cont_get_fit_bottom(const lv_obj_t * cont)
/**********************
* STATIC FUNCTIONS
**********************/
extern uint32_t cont_sign;
/**
* Signal function of the container
* @param cont pointer to a container object
@ -528,7 +528,6 @@ static void lv_cont_layout_pretty(lv_obj_t * cont)
break;
}
w_row += w + pinner; /*Add the object width + inner padding*/
lv_coord_t child_h = lv_obj_get_height(child_rc);
lv_coord_t h = lv_obj_get_height(child_rc);
h += lv_obj_get_style_margin_top(child_rc, LV_OBJ_PART_MAIN);