diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index bd67344f87..f00ba1c656 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -805,7 +805,7 @@ void lv_obj_set_height(lv_obj_t * obj, lv_coord_t h) * @param obj pointer to an object * @param w the width without paddings */ -void lv_obj_set_width_fit(const lv_obj_t * obj, lv_coord_t w) +void lv_obj_set_width_fit(lv_obj_t * obj, lv_coord_t w) { lv_style_int_t pleft = lv_obj_get_style_pad_left(obj, LV_OBJ_PART_MAIN); lv_style_int_t pright = lv_obj_get_style_pad_right(obj, LV_OBJ_PART_MAIN); @@ -818,7 +818,7 @@ void lv_obj_set_width_fit(const lv_obj_t * obj, lv_coord_t w) * @param obj pointer to an object * @param h the height without paddings */ -void lv_obj_set_height_fit(const lv_obj_t * obj, lv_coord_t h) +void lv_obj_set_height_fit(lv_obj_t * obj, lv_coord_t h) { lv_style_int_t ptop = lv_obj_get_style_pad_top(obj, LV_OBJ_PART_MAIN); lv_style_int_t pbottom = lv_obj_get_style_pad_bottom(obj, LV_OBJ_PART_MAIN); diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index 385119a6e2..654e4e96ca 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -431,14 +431,14 @@ void lv_obj_set_height(lv_obj_t * obj, lv_coord_t h); * @param obj pointer to an object * @param w the width without paddings */ -void lv_obj_set_width_fit(const lv_obj_t * obj, lv_coord_t w); +void lv_obj_set_width_fit(lv_obj_t * obj, lv_coord_t w); /** * Set the height reduced by the top and bottom padding. * @param obj pointer to an object * @param h the height without paddings */ -void lv_obj_set_height_fit(const lv_obj_t * obj, lv_coord_t h); +void lv_obj_set_height_fit(lv_obj_t * obj, lv_coord_t h); /** * Set the width of an object by taking the left and right margin into account. diff --git a/src/lv_misc/lv_mem.h b/src/lv_misc/lv_mem.h index a4fdaa0289..d1542385af 100644 --- a/src/lv_misc/lv_mem.h +++ b/src/lv_misc/lv_mem.h @@ -149,8 +149,8 @@ void * lv_memcpy(void * dst, const void * src, size_t len); */ static inline void * lv_memcpy_small(void * dst, const void * src, size_t len) { - uint8_t * d8 = dst; - const uint8_t * s8 = src; + uint8_t * d8 = (uint8_t *)dst; + const uint8_t * s8 = (const uint8_t *)src; while(len) { *d8 = *s8; d8++; s8++;