fix minor warnings
This commit is contained in:
@@ -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 old_len = strlen(txt_buf);
|
||||||
size_t ins_len = strlen(ins_txt);
|
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*/
|
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*/
|
/*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--) {
|
for(i = new_len; i >= pos + ins_len; i--) {
|
||||||
txt_buf[i] = txt_buf[i - ins_len];
|
txt_buf[i] = txt_buf[i - ins_len];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -89,11 +89,11 @@ lv_obj_t * lv_imgbtn_create(lv_obj_t * par, const lv_obj_t * copy)
|
|||||||
else {
|
else {
|
||||||
lv_imgbtn_ext_t * copy_ext = lv_obj_get_ext_attr(copy);
|
lv_imgbtn_ext_t * copy_ext = lv_obj_get_ext_attr(copy);
|
||||||
#if LV_IMGBTN_TILED == 0
|
#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
|
#else
|
||||||
memcpy(ext->img_src_left, (void*)copy_ext->img_src_left, sizeof(ext->img_src_left));
|
memcpy((void*)ext->img_src_left, 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((void*)ext->img_src_mid, 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_right, copy_ext->img_src_right, sizeof(ext->img_src_right));
|
||||||
#endif
|
#endif
|
||||||
/*Refresh the style with new signal function*/
|
/*Refresh the style with new signal function*/
|
||||||
lv_obj_refresh_style(new_imgbtn);
|
lv_obj_refresh_style(new_imgbtn);
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ int16_t lv_lmeter_get_max_value(const lv_obj_t * lmeter);
|
|||||||
* @param lmeter pointer to a line meter object
|
* @param lmeter pointer to a line meter object
|
||||||
* @return number of the scale units
|
* @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
|
* Get the scale angle of a line meter
|
||||||
|
|||||||
@@ -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_ext_t * copy_ext = lv_obj_get_ext_attr(copy);
|
||||||
|
|
||||||
lv_spinbox_set_value(new_spinbox, copy_ext->value);
|
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_range(new_spinbox, copy_ext->range_min, copy_ext->range_max);
|
||||||
lv_spinbox_set_step(new_spinbox, copy_ext->step);
|
lv_spinbox_set_step(new_spinbox, copy_ext->step);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user