Skip to content

Commit

Permalink
fix minor warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
kisvegabor committed Dec 5, 2019
1 parent c23655a commit 1f2987a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/lv_misc/lv_txt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
Expand Down
8 changes: 4 additions & 4 deletions src/lv_objx/lv_imgbtn.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/lv_objx/lv_lmeter.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/lv_objx/lv_spinbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 1f2987a

Please sign in to comment.