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

fix minor warnings

This commit is contained in:
Gabor Kiss-Vamosi 2019-12-05 06:44:11 +01:00
parent c23655a0d7
commit 1f2987a66b
4 changed files with 8 additions and 8 deletions

View File

@ -418,11 +418,11 @@ void lv_txt_ins(char * txt_buf, uint32_t pos, const char * ins_txt)
{
size_t old_len = strlen(txt_buf);
size_t ins_len = strlen(ins_txt);
uint32_t new_len = ins_len + old_len;
size_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*/
/*Copy the second part into the end to make place to text to insert*/
uint32_t i;
size_t i;
for(i = new_len; i >= pos + ins_len; i--) {
txt_buf[i] = txt_buf[i - ins_len];
}

View File

@ -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, (void*)copy_ext->img_src, sizeof(ext->img_src));
memcpy((void*)ext->img_src, copy_ext->img_src, sizeof(ext->img_src));
#else
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));
memcpy((void*)ext->img_src_left, copy_ext->img_src_left, sizeof(ext->img_src_left));
memcpy((void*)ext->img_src_mid, copy_ext->img_src_mid, sizeof(ext->img_src_mid));
memcpy((void*)ext->img_src_right, copy_ext->img_src_right, sizeof(ext->img_src_right));
#endif
/*Refresh the style with new signal function*/
lv_obj_refresh_style(new_imgbtn);

View File

@ -138,7 +138,7 @@ int16_t lv_lmeter_get_max_value(const lv_obj_t * lmeter);
* @param lmeter pointer to a line meter object
* @return number of the scale units
*/
uint8_t lv_lmeter_get_line_count(const lv_obj_t * lmeter);
uint16_t lv_lmeter_get_line_count(const lv_obj_t * lmeter);
/**
* Get the scale angle of a line meter

View File

@ -97,7 +97,7 @@ lv_obj_t * lv_spinbox_create(lv_obj_t * par, const lv_obj_t * copy)
lv_spinbox_ext_t * copy_ext = lv_obj_get_ext_attr(copy);
lv_spinbox_set_value(new_spinbox, copy_ext->value);
lv_spinbox_set_digit_format(new_spinbox, copy_ext->digit_count, copy_ext->dec_point_pos);
lv_spinbox_set_digit_format(new_spinbox, (uint8_t)copy_ext->digit_count, (uint8_t)copy_ext->dec_point_pos);
lv_spinbox_set_range(new_spinbox, copy_ext->range_min, copy_ext->range_max);
lv_spinbox_set_step(new_spinbox, copy_ext->step);