fix conversation warnings

This commit is contained in:
Gabor Kiss-Vamosi
2019-12-02 12:20:01 +01:00
parent 6e8a4eeed4
commit 6c8b0c44be
25 changed files with 54 additions and 54 deletions

View File

@@ -131,7 +131,7 @@ void lv_debug_log_error(const char * msg, uint64_t value)
{
static const char hex[] = "0123456789ABCDEF";
uint32_t msg_len = strlen(msg);
size_t msg_len = strlen(msg);
uint32_t value_len = sizeof(unsigned long int);
if(msg_len < 230) {

View File

@@ -49,7 +49,7 @@ void lv_debug_log_error(const char * msg, uint64_t value);
{ \
if(!(expr)) { \
LV_LOG_ERROR(__func__); \
lv_debug_log_error(msg, (unsigned long int)value); \
lv_debug_log_error(msg, (uint64_t)value); \
while(1); \
} \
}

View File

@@ -79,7 +79,7 @@ void lv_draw_img(const lv_area_t * coords, const lv_area_t * mask, const void *
lv_color_t lv_img_buf_get_px_color(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y, const lv_style_t * style)
{
lv_color_t p_color = LV_COLOR_BLACK;
if(x >= dsc->header.w) {
if(x >= (lv_coord_t)dsc->header.w) {
x = dsc->header.w - 1;
LV_LOG_WARN("lv_canvas_get_px: x is too large (out of canvas)");
} else if(x < 0) {
@@ -87,7 +87,7 @@ lv_color_t lv_img_buf_get_px_color(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t
LV_LOG_WARN("lv_canvas_get_px: x is < 0 (out of canvas)");
}
if(y >= dsc->header.h) {
if(y >= (lv_coord_t)dsc->header.h) {
y = dsc->header.h - 1;
LV_LOG_WARN("lv_canvas_get_px: y is too large (out of canvas)");
} else if(y < 0) {
@@ -158,7 +158,7 @@ lv_color_t lv_img_buf_get_px_color(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t
*/
lv_opa_t lv_img_buf_get_px_alpha(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y)
{
if(x >= dsc->header.w) {
if(x >= (lv_coord_t)dsc->header.w) {
x = dsc->header.w - 1;
LV_LOG_WARN("lv_canvas_get_px: x is too large (out of canvas)");
} else if(x < 0) {
@@ -166,7 +166,7 @@ lv_opa_t lv_img_buf_get_px_alpha(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y)
LV_LOG_WARN("lv_canvas_get_px: x is < 0 (out of canvas)");
}
if(y >= dsc->header.h) {
if(y >= (lv_coord_t)dsc->header.h) {
y = dsc->header.h - 1;
LV_LOG_WARN("lv_canvas_get_px: y is too large (out of canvas)");
} else if(y < 0) {

View File

@@ -124,7 +124,7 @@ lv_res_t lv_img_decoder_open(lv_img_decoder_dsc_t * dsc, const void * src, const
dsc->user_data = NULL;
if(dsc->src_type == LV_IMG_SRC_FILE) {
uint16_t fnlen = strlen(src);
size_t fnlen = strlen(src);
dsc->src = lv_mem_alloc(fnlen + 1);
strcpy((char *)dsc->src, src);
} else {

View File

@@ -107,7 +107,7 @@ const uint8_t * lv_font_get_bitmap_fmt_txt(const lv_font_t * font, uint32_t unic
if(buf == NULL) return NULL;
}
decompress(&fdsc->glyph_bitmap[gdsc->bitmap_index], buf, gdsc->box_w , gdsc->box_h, fdsc->bpp);
decompress(&fdsc->glyph_bitmap[gdsc->bitmap_index], buf, gdsc->box_w , gdsc->box_h, (uint8_t)fdsc->bpp);
return buf;
}
@@ -150,7 +150,7 @@ bool lv_font_get_glyph_dsc_fmt_txt(const lv_font_t * font, lv_font_glyph_dsc_t *
dsc_out->box_w = gdsc->box_w;
dsc_out->ofs_x = gdsc->ofs_x;
dsc_out->ofs_y = gdsc->ofs_y;
dsc_out->bpp = fdsc->bpp;
dsc_out->bpp = (uint8_t)fdsc->bpp;
return true;
}
@@ -186,7 +186,7 @@ static uint32_t get_glyph_dsc_id(const lv_font_t * font, uint32_t letter)
uint8_t * p = lv_utils_bsearch(&rcp, fdsc->cmaps[i].unicode_list, fdsc->cmaps[i].list_length, sizeof(fdsc->cmaps[i].unicode_list[0]), unicode_list_compare);
if(p) {
uint32_t ofs = (lv_uintptr_t)p - (lv_uintptr_t) fdsc->cmaps[i].unicode_list;
lv_uintptr_t ofs = (lv_uintptr_t)p - (lv_uintptr_t) fdsc->cmaps[i].unicode_list;
ofs = ofs >> 1; /*The list stores `uint16_t` so the get the index divide by 2*/
glyph_id = fdsc->cmaps[i].glyph_id_start + ofs;
}
@@ -195,7 +195,7 @@ static uint32_t get_glyph_dsc_id(const lv_font_t * font, uint32_t letter)
uint8_t * p = lv_utils_bsearch(&rcp, fdsc->cmaps[i].unicode_list, fdsc->cmaps[i].list_length, sizeof(fdsc->cmaps[i].unicode_list[0]), unicode_list_compare);
if(p) {
uint32_t ofs = (lv_uintptr_t)p - (lv_uintptr_t) fdsc->cmaps[i].unicode_list;
lv_uintptr_t ofs = (lv_uintptr_t)p - (lv_uintptr_t) fdsc->cmaps[i].unicode_list;
ofs = ofs >> 1; /*The list stores `uint16_t` so the get the index divide by 2*/
const uint8_t * gid_ofs_16 = fdsc->cmaps[i].glyph_id_ofs_list;
glyph_id = fdsc->cmaps[i].glyph_id_start + gid_ofs_16[ofs];
@@ -232,7 +232,7 @@ static int8_t get_kern_value(const lv_font_t * font, uint32_t gid_left, uint32_t
/*If the `g_id_both` were found get its index from the pointer*/
if(kid_p) {
uint32_t ofs = (lv_uintptr_t)kid_p - (lv_uintptr_t)g_ids;
lv_uintptr_t ofs = (lv_uintptr_t)kid_p - (lv_uintptr_t)g_ids;
ofs = ofs >> 1; /*ofs is for pair, divide by 2 to refer as a single value*/
value = kdsc->values[ofs];
}
@@ -240,12 +240,12 @@ static int8_t get_kern_value(const lv_font_t * font, uint32_t gid_left, uint32_t
/* Use binary search to find the kern value.
* The pairs are ordered left_id first, then right_id secondly. */
const uint16_t * g_ids = kdsc->glyph_ids;
uint32_t g_id_both = (uint32_t)((uint32_t)gid_right << 8) + gid_left; /*Create one number from the ids*/
lv_uintptr_t g_id_both = (uint32_t)((uint32_t)gid_right << 8) + gid_left; /*Create one number from the ids*/
uint8_t * kid_p = lv_utils_bsearch(&g_id_both, g_ids, kdsc->pair_cnt, 4, kern_pair_16_compare);
/*If the `g_id_both` were found get its index from the pointer*/
if(kid_p) {
uint32_t ofs = (lv_uintptr_t)kid_p - (lv_uintptr_t)g_ids;
lv_uintptr_t ofs = (lv_uintptr_t)kid_p - (lv_uintptr_t)g_ids;
ofs = ofs >> 4; /*ofs is 4 byte pairs, divide by 4 to refer as a single value*/
value = kdsc->values[ofs];
}

View File

@@ -539,7 +539,7 @@ char * lv_fs_get_letters(char * buf)
*/
const char * lv_fs_get_ext(const char * fn)
{
uint16_t i;
size_t i;
for(i = strlen(fn); i > 0; i--) {
if(fn[i] == '.') {
return &fn[i + 1];
@@ -558,7 +558,7 @@ const char * lv_fs_get_ext(const char * fn)
*/
char * lv_fs_up(char * path)
{
uint16_t len = strlen(path);
size_t len = strlen(path);
if(len == 0) return path;
len--; /*Go before the trailing '\0'*/
@@ -589,7 +589,7 @@ char * lv_fs_up(char * path)
*/
const char * lv_fs_get_last(const char * path)
{
uint16_t len = strlen(path);
size_t len = strlen(path);
if(len == 0) return path;
len--; /*Go before the trailing '\0'*/

View File

@@ -107,7 +107,7 @@ void lv_mem_init(void)
* @param size size of the memory to allocate in bytes
* @return pointer to the allocated memory
*/
void * lv_mem_alloc(uint32_t size)
void * lv_mem_alloc(size_t size)
{
if(size == 0) {
return &zero_mem;
@@ -222,7 +222,7 @@ void lv_mem_free(const void * data)
#if LV_ENABLE_GC == 0
void * lv_mem_realloc(void * data_p, uint32_t new_size)
void * lv_mem_realloc(void * data_p, size_t new_size)
{
/*data_p could be previously freed pointer (in this case it is invalid)*/
if(data_p != NULL) {

View File

@@ -70,7 +70,7 @@ void lv_mem_init(void);
* @param size size of the memory to allocate in bytes
* @return pointer to the allocated memory
*/
void * lv_mem_alloc(uint32_t size);
void * lv_mem_alloc(size_t size);
/**
* Free an allocated data
@@ -85,7 +85,7 @@ void lv_mem_free(const void * data);
* @param new_size the desired new size in byte
* @return pointer to the new memory
*/
void * lv_mem_realloc(void * data_p, uint32_t new_size);
void * lv_mem_realloc(void * data_p, size_t new_size);
/**
* Join the adjacent free memory blocks

View File

@@ -416,8 +416,8 @@ bool lv_txt_is_cmd(lv_txt_cmd_state_t * state, uint32_t c)
*/
void lv_txt_ins(char * txt_buf, uint32_t pos, const char * ins_txt)
{
uint32_t old_len = strlen(txt_buf);
uint32_t ins_len = strlen(ins_txt);
size_t old_len = strlen(txt_buf);
size_t ins_len = strlen(ins_txt);
uint32_t new_len = ins_len + old_len;
pos = lv_txt_encoded_get_byte_id(txt_buf, pos); /*Convert to byte index instead of letter index*/
@@ -441,7 +441,7 @@ void lv_txt_ins(char * txt_buf, uint32_t pos, const char * ins_txt)
void lv_txt_cut(char * txt, uint32_t pos, uint32_t len)
{
uint32_t old_len = strlen(txt);
size_t old_len = strlen(txt);
pos = lv_txt_encoded_get_byte_id(txt, pos); /*Convert to byte index instead of letter index*/
len = lv_txt_encoded_get_byte_id(&txt[pos], len);

View File

@@ -138,7 +138,7 @@ lv_obj_t * lv_btn_create(lv_obj_t * par, const lv_obj_t * copy)
ext->ink_wait_time = copy_ext->ink_wait_time;
ext->ink_out_time = copy_ext->ink_out_time;
#endif
memcpy(ext->styles, copy_ext->styles, sizeof(ext->styles));
memcpy((void*) ext->styles, copy_ext->styles, sizeof(ext->styles));
/*Refresh the style with new signal function*/
lv_obj_refresh_style(new_btn);

View File

@@ -122,7 +122,7 @@ lv_obj_t * lv_btnm_create(lv_obj_t * par, const lv_obj_t * copy)
/*Copy an existing object*/
else {
lv_btnm_ext_t * copy_ext = lv_obj_get_ext_attr(copy);
memcpy(ext->styles_btn, copy_ext->styles_btn, sizeof(ext->styles_btn));
memcpy((void*)ext->styles_btn, copy_ext->styles_btn, sizeof(ext->styles_btn));
lv_btnm_set_map(new_btnm, lv_btnm_get_map_array(copy));
}

View File

@@ -700,7 +700,7 @@ static void draw_header(lv_obj_t * calendar, const lv_area_t * mask)
/*Add the right arrow*/
arrow_style = ext->btn_pressing > 0 ? ext->style_header_pr : ext->style_header;
header_area.x1 = header_area.x2 - ext->style_header->body.padding.right -
lv_txt_get_width(LV_SYMBOL_RIGHT, strlen(LV_SYMBOL_RIGHT), arrow_style->text.font,
lv_txt_get_width(LV_SYMBOL_RIGHT, (uint16_t)strlen(LV_SYMBOL_RIGHT), arrow_style->text.font,
arrow_style->text.line_space, LV_TXT_FLAG_NONE);
lv_draw_label(&header_area, mask, arrow_style, opa_scale, LV_SYMBOL_RIGHT, LV_TXT_FLAG_NONE, NULL, NULL, NULL, bidi_dir);
}

View File

@@ -50,8 +50,8 @@ typedef struct
lv_calendar_date_t showed_date; /*Currently visible month (day is ignored)*/
lv_calendar_date_t * highlighted_dates; /*Apply different style on these days (pointer to an
array defined by the user)*/
uint8_t highlighted_dates_num; /*Number of elements in `highlighted_days`*/
int8_t btn_pressing; /*-1: prev month pressing, +1 next month pressing on the header*/
uint16_t highlighted_dates_num; /*Number of elements in `highlighted_days`*/
lv_calendar_date_t pressed_date;
const char ** day_names; /*Pointer to an array with the name of the days (NULL: use default names)*/
const char ** month_names; /*Pointer to an array with the name of the month (NULL. use default names)*/

View File

@@ -254,7 +254,7 @@ void lv_canvas_copy_buf(lv_obj_t * canvas, const void * to_copy, lv_coord_t x, l
LV_ASSERT_NULL(to_copy);
lv_canvas_ext_t * ext = lv_obj_get_ext_attr(canvas);
if(x + w >= ext->dsc.header.w || y + h >= ext->dsc.header.h) {
if(x + w >= (lv_coord_t)ext->dsc.header.w || y + h >= (lv_coord_t)ext->dsc.header.h) {
LV_LOG_WARN("lv_canvas_copy_buf: x or y out of the canvas");
return;
}

View File

@@ -889,7 +889,7 @@ static lv_res_t lv_cpicker_signal(lv_obj_t * cpicker, lv_signal_t sign, void * p
if(ext->type == LV_CPICKER_TYPE_RECT) {
/*If pressed long enough without change go to next color mode*/
uint32_t diff = lv_tick_elaps(ext->last_change_time);
if(diff > indev->driver.long_press_time * 2 && !ext->color_mode_fixed) {
if(diff > (uint32_t)indev->driver.long_press_time * 2 && !ext->color_mode_fixed) {
next_color_mode(cpicker);
lv_indev_wait_release(lv_indev_get_act());
return res;

View File

@@ -388,7 +388,7 @@ void lv_ddlist_get_selected_str(const lv_obj_t * ddlist, char * buf, uint16_t bu
uint16_t i;
uint16_t line = 0;
const char * opt_txt = lv_label_get_text(ext->label);
uint16_t txt_len = strlen(opt_txt);
size_t txt_len = strlen(opt_txt);
for(i = 0; i < txt_len && line != ext->sel_opt_id; i++) {
if(opt_txt[i] == '\n') line++;
@@ -626,7 +626,7 @@ static bool lv_ddlist_design(lv_obj_t * ddlist, const lv_area_t * mask, lv_desig
new_style.text.color = sel_style->text.color;
new_style.text.opa = sel_style->text.opa;
lv_area_t area_arrow;
lv_coord_t arrow_width = lv_txt_get_width(LV_SYMBOL_DOWN, strlen(LV_SYMBOL_DOWN), sel_style->text.font, 0, 0);
lv_coord_t arrow_width = lv_txt_get_width(LV_SYMBOL_DOWN, (uint16_t)strlen(LV_SYMBOL_DOWN), sel_style->text.font, 0, 0);
if(lv_label_get_align(ext->label) != LV_LABEL_ALIGN_RIGHT) {
area_arrow.x2 = ddlist->coords.x2 - style->body.padding.right;
area_arrow.x1 = area_arrow.x2 - arrow_width;

View File

@@ -68,7 +68,7 @@ lv_obj_t * lv_imgbtn_create(lv_obj_t * par, const lv_obj_t * copy)
/*Initialize the allocated 'ext' */
#if LV_IMGBTN_TILED == 0
memset(ext->img_src, 0, sizeof(ext->img_src));
memset((void*)ext->img_src, 0, sizeof(ext->img_src));
#else
memset(ext->img_src_left, 0, sizeof(ext->img_src_left));
memset(ext->img_src_mid, 0, sizeof(ext->img_src_mid));
@@ -89,11 +89,11 @@ lv_obj_t * lv_imgbtn_create(lv_obj_t * par, const lv_obj_t * copy)
else {
lv_imgbtn_ext_t * copy_ext = lv_obj_get_ext_attr(copy);
#if LV_IMGBTN_TILED == 0
memcpy(ext->img_src, copy_ext->img_src, sizeof(ext->img_src));
memcpy(ext->img_src, (void*)copy_ext->img_src, sizeof(ext->img_src));
#else
memcpy(ext->img_src_left, copy_ext->img_src_left, sizeof(ext->img_src_left));
memcpy(ext->img_src_mid, copy_ext->img_src_mid, sizeof(ext->img_src_mid));
memcpy(ext->img_src_right, copy_ext->img_src_right, sizeof(ext->img_src_right));
memcpy(ext->img_src_left, (void*)copy_ext->img_src_left, sizeof(ext->img_src_left));
memcpy(ext->img_src_mid, (void*)copy_ext->img_src_mid, sizeof(ext->img_src_mid));
memcpy(ext->img_src_right, (void*)copy_ext->img_src_right, sizeof(ext->img_src_right));
#endif
/*Refresh the style with new signal function*/
lv_obj_refresh_style(new_imgbtn);
@@ -413,7 +413,7 @@ static void refr_img(lv_obj_t * imgbtn)
if(lv_img_src_get_type(src) == LV_IMG_SRC_SYMBOL) {
const lv_style_t * style = ext->btn.styles[state];
header.h = lv_font_get_line_height(style->text.font);
header.w = lv_txt_get_width(src, strlen(src), style->text.font, style->text.letter_space, LV_TXT_FLAG_NONE);
header.w = lv_txt_get_width(src, (uint16_t)strlen(src), style->text.font, style->text.letter_space, LV_TXT_FLAG_NONE);
header.always_zero = 0;
header.cf = LV_IMG_CF_ALPHA_1BIT;
} else {

View File

@@ -146,7 +146,7 @@ lv_obj_t * lv_label_create(lv_obj_t * par, const lv_obj_t * copy)
}
if(copy_ext->dot_tmp_alloc && copy_ext->dot.tmp_ptr) {
int len = strlen(copy_ext->dot.tmp_ptr);
uint16_t len = (uint16_t )strlen(copy_ext->dot.tmp_ptr);
lv_label_set_dot_tmp(new_label, ext->dot.tmp_ptr, len);
} else {
memcpy(ext->dot.tmp, copy_ext->dot.tmp, sizeof(ext->dot.tmp));
@@ -195,7 +195,7 @@ void lv_label_set_text(lv_obj_t * label, const char * text)
if(ext->text == NULL) return;
} else {
/*Allocate space for the new text*/
uint32_t len = strlen(text) + 1;
size_t len = strlen(text) + 1;
if(ext->text != NULL && ext->static_txt == 0) {
lv_mem_free(ext->text);
ext->text = NULL;
@@ -947,9 +947,9 @@ void lv_label_ins_text(lv_obj_t * label, uint32_t pos, const char * txt)
lv_obj_invalidate(label);
/*Allocate space for the new text*/
uint32_t old_len = strlen(ext->text);
uint32_t ins_len = strlen(txt);
uint32_t new_len = ins_len + old_len;
size_t old_len = strlen(ext->text);
size_t ins_len = strlen(txt);
size_t new_len = ins_len + old_len;
ext->text = lv_mem_realloc(ext->text, new_len + 1);
LV_ASSERT_MEM(ext->text);
if(ext->text == NULL) return;

View File

@@ -319,7 +319,7 @@ void lv_list_set_btn_selected(lv_obj_t * list, lv_obj_t * btn)
else if(s == LV_BTN_STATE_TGL_REL)
lv_btn_set_state(ext->selected_btn, LV_BTN_STATE_TGL_PR);
lv_page_focus(list, ext->selected_btn, lv_list_get_anim_time(list));
lv_page_focus(list, ext->selected_btn, LV_ANIM_ON);
}
}

View File

@@ -165,7 +165,7 @@ void lv_lmeter_set_range(lv_obj_t * lmeter, int16_t min, int16_t max)
* @param angle angle of the scale (0..360)
* @param line_cnt number of lines
*/
void lv_lmeter_set_scale(lv_obj_t * lmeter, uint16_t angle, uint8_t line_cnt)
void lv_lmeter_set_scale(lv_obj_t * lmeter, uint16_t angle, uint16_t line_cnt)
{
LV_ASSERT_OBJ(lmeter, LV_OBJX_NAME);

View File

@@ -37,7 +37,7 @@ typedef struct
/*New data for this type */
uint16_t scale_angle; /*Angle of the scale in deg. (0..360)*/
uint16_t angle_ofs;
uint8_t line_cnt; /*Count of lines */
uint16_t line_cnt; /*Count of lines */
int16_t cur_value;
int16_t min_value;
int16_t max_value;
@@ -87,7 +87,7 @@ void lv_lmeter_set_range(lv_obj_t * lmeter, int16_t min, int16_t max);
* @param angle angle of the scale (0..360)
* @param line_cnt number of lines
*/
void lv_lmeter_set_scale(lv_obj_t * lmeter, uint16_t angle, uint8_t line_cnt);
void lv_lmeter_set_scale(lv_obj_t * lmeter, uint16_t angle, uint16_t line_cnt);
/**
* Set the set an offset for the line meter's angles to rotate it.

View File

@@ -154,7 +154,7 @@ void lv_roller_set_options(lv_obj_t * roller, const char * options, lv_roller_mo
} else {
ext->mode = LV_ROLLER_MODE_INIFINITE;
uint32_t opt_len = strlen(options) + 1; /*+1 to add '\n' after option lists*/
size_t opt_len = strlen(options) + 1; /*+1 to add '\n' after option lists*/
char * opt_extra = lv_mem_alloc(opt_len * LV_ROLLER_INF_PAGES);
uint8_t i;
for(i = 0; i < LV_ROLLER_INF_PAGES; i++) {

View File

@@ -412,7 +412,7 @@ static void lv_spinbox_updatevalue(lv_obj_t * spinbox)
buf_p++;
}
int i;
int32_t i;
/*padding left*/
for(i = 0; i < ext->digit_padding_left; i++) {
(*buf_p) = ' ';
@@ -426,7 +426,7 @@ static void lv_spinbox_updatevalue(lv_obj_t * spinbox)
/*Add leading zeros*/
int lz_cnt = ext->digit_count - (int)strlen(digits);
if(lz_cnt > 0) {
for(i = strlen(digits); i >= 0; i--) {
for(i = (uint16_t)strlen(digits); i >= 0; i--) {
digits[i + lz_cnt] = digits[i];
}
for(i = 0; i < lz_cnt; i++) {
@@ -459,7 +459,7 @@ static void lv_spinbox_updatevalue(lv_obj_t * spinbox)
/*Set the cursor position*/
int32_t step = ext->step;
uint8_t cur_pos = ext->digit_count;
uint8_t cur_pos = (uint8_t)ext->digit_count;
while(step >= 10) {
step /= 10;
cur_pos--;

View File

@@ -689,7 +689,7 @@ void lv_ta_set_pwd_mode(lv_obj_t * ta, bool en)
/*Pwd mode is now enabled*/
if(ext->pwd_mode == 0 && en != false) {
char * txt = lv_label_get_text(ext->label);
uint16_t len = strlen(txt);
size_t len = strlen(txt);
ext->pwd_tmp = lv_mem_alloc(len + 1);
LV_ASSERT_MEM(ext->pwd_tmp);
if(ext->pwd_tmp == NULL) return;

View File

@@ -242,11 +242,11 @@ lv_obj_t * lv_tabview_add_tab(lv_obj_t * tabview, const char * name)
switch(ext->btns_pos) {
case LV_TABVIEW_BTNS_POS_TOP:
case LV_TABVIEW_BTNS_POS_BOTTOM:
ext->tab_name_ptr = lv_mem_realloc(ext->tab_name_ptr, sizeof(char *) * (ext->tab_cnt + 1));
ext->tab_name_ptr = lv_mem_realloc((void*)ext->tab_name_ptr, sizeof(char *) * (ext->tab_cnt + 1));
break;
case LV_TABVIEW_BTNS_POS_LEFT:
case LV_TABVIEW_BTNS_POS_RIGHT:
ext->tab_name_ptr = lv_mem_realloc(ext->tab_name_ptr, sizeof(char *) * (ext->tab_cnt * 2));
ext->tab_name_ptr = lv_mem_realloc((void*)ext->tab_name_ptr, sizeof(char *) * (ext->tab_cnt * 2));
break;
}