fix a lot of warnings

This commit is contained in:
Gabor Kiss-Vamosi
2017-12-02 20:43:50 +01:00
parent 525c8d3dd9
commit d6e1705a1a
33 changed files with 74 additions and 25 deletions

View File

@@ -417,6 +417,7 @@ static bool lv_btnm_design(lv_obj_t * btnm, const lv_area_t * mask, lv_design_mo
else if(btn_i == ext->btn_id_pr && btn_i != ext->btn_id_tgl) btn_style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BTN_PR);
else if(btn_i != ext->btn_id_pr && btn_i == ext->btn_id_tgl) btn_style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BTN_TGL_REL);
else if(btn_i == ext->btn_id_pr && btn_i == ext->btn_id_tgl) btn_style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BTN_TGL_PR);
else btn_style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BTN_REL); /*Not possible option, just to be sure*/
/*On the right buttons clear the border if only right borders are drawn*/
if(ext->map_p[txt_i + 1][0] == '\0' || ext->map_p[txt_i + 1][0] == '\n') {

View File

@@ -332,7 +332,7 @@ lv_coord_t lv_chart_get_series_width(lv_obj_t * chart)
* @param chart pointer to chart object
* @return dark effect level (LV_OPA_TRANSP to turn off)
*/
lv_opa_t lv_chart_get_series_darking(lv_obj_t * chart, lv_opa_t dark_eff)
lv_opa_t lv_chart_get_series_darking(lv_obj_t * chart)
{
lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart);
return ext->series.dark;

View File

@@ -195,7 +195,7 @@ lv_coord_t lv_chart_get_series_width(lv_obj_t * chart);
* @param chart pointer to chart object
* @return dark effect level (LV_OPA_TRANSP to turn off)
*/
lv_opa_t lv_chart_get_series_darking(lv_obj_t * chart, lv_opa_t dark_eff);
lv_opa_t lv_chart_get_series_darking(lv_obj_t * chart);
/**
* Get the style of an chart object

View File

@@ -205,9 +205,9 @@ void lv_img_set_upscale(lv_obj_t * img, bool upscale_en)
/*Upscale works only if antialiassing is enabled*/
#if LV_ANTIALIAS == 0
upscale_en = false;
#else
ext->upscale = (upscale_en == false ? 0 : 1);
#endif
ext->upscale = (upscale_en == false ? 0 : 1);
/*Refresh the image with the new size*/
lv_img_set_file(img, ext->fn);
}

View File

@@ -274,7 +274,7 @@ lv_kb_mode_t lv_kb_get_mode(lv_obj_t * kb)
* @param kb pointer to a Keyboard object
* @return true: show cursor on the current text area, false: hide cursor
*/
bool lv_kb_get_cursor_manage(lv_obj_t * kb, bool en)
bool lv_kb_get_cursor_manage(lv_obj_t * kb)
{
lv_kb_ext_t * ext = lv_obj_get_ext_attr(kb);
return ext->cursor_mng == 0 ? false : true;
@@ -285,7 +285,7 @@ bool lv_kb_get_cursor_manage(lv_obj_t * kb, bool en)
* @param kb pointer to Keyboard object
* @return the ok callback
*/
lv_action_t lv_kb_get_ok_action(lv_obj_t * kb, lv_action_t action)
lv_action_t lv_kb_get_ok_action(lv_obj_t * kb)
{
lv_kb_ext_t * ext = lv_obj_get_ext_attr(kb);
return ext->ok_action;
@@ -296,7 +296,7 @@ lv_action_t lv_kb_get_ok_action(lv_obj_t * kb, lv_action_t action)
* @param kb pointer to Keyboard object
* @return the close callback
*/
lv_action_t lv_kb_get_close_action(lv_obj_t * kb, lv_action_t action)
lv_action_t lv_kb_get_close_action(lv_obj_t * kb)
{
lv_kb_ext_t * ext = lv_obj_get_ext_attr(kb);
return ext->close_action;

View File

@@ -135,21 +135,21 @@ lv_kb_mode_t lv_kb_get_mode(lv_obj_t * kb);
* @param kb pointer to a Keyboard object
* @return true: show cursor on the current text area, false: hide cursor
*/
bool lv_kb_get_cursor_manage(lv_obj_t * kb, bool en);
bool lv_kb_get_cursor_manage(lv_obj_t * kb);
/**
* Get the callback to call when the "Ok" button is pressed
* @param kb pointer to Keyboard object
* @return the ok callback
*/
lv_action_t lv_kb_get_ok_action(lv_obj_t * kb, lv_action_t action);
lv_action_t lv_kb_get_ok_action(lv_obj_t * kb);
/**
* Get the callback to call when the "Hide" button is pressed
* @param kb pointer to Keyboard object
* @return the close callback
*/
lv_action_t lv_kb_get_close_action(lv_obj_t * kb, lv_action_t action);
lv_action_t lv_kb_get_close_action(lv_obj_t * kb);
/**
* Get a style of a keyboard

View File

@@ -244,7 +244,7 @@ static bool lv_roller_design(lv_obj_t * roller, const lv_area_t * mask, lv_desig
*/
static lv_res_t lv_roller_signal(lv_obj_t * roller, lv_signal_t sign, void * param)
{
lv_res_t res;
lv_res_t res = LV_RES_OK;
/*Don't let the drop down list to handle the control signals. It works differently*/
if(sign != LV_SIGNAL_CONTROLL && sign != LV_SIGNAL_FOCUS && sign != LV_SIGNAL_DEFOCUS) {

View File

@@ -1013,7 +1013,8 @@ static void cursor_blink_anim(lv_obj_t * ta, uint8_t show)
*/
static void pwd_char_hider_anim(lv_obj_t * ta, int32_t x)
{
(void)ta;
(void)x;
}
/**

View File

@@ -446,7 +446,7 @@ bool lv_tabview_get_sliding(lv_obj_t * tabview)
* @param tabview pointer to Tab view object
* @return time of animation in milliseconds
*/
uint16_t lv_tabview_get_anim_time(lv_obj_t * tabview, uint16_t anim_time_ms)
uint16_t lv_tabview_get_anim_time(lv_obj_t * tabview)
{
lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview);
return ext->anim_time;
@@ -595,6 +595,8 @@ static lv_res_t tabpage_scrl_signal(lv_obj_t * tab_scrl, lv_signal_t sign, void
*/
static void tabpage_pressed_hadler(lv_obj_t * tabview, lv_obj_t * tabpage)
{
(void)tabpage;
lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview);
lv_indev_t * indev = lv_indev_get_act();
lv_indev_get_point(indev, &ext->point_last);

View File

@@ -182,7 +182,7 @@ bool lv_tabview_get_sliding(lv_obj_t * tabview);
* @param tabview pointer to Tab view object
* @return time of animation in milliseconds
*/
uint16_t lv_tabview_get_anim_time(lv_obj_t * tabview, uint16_t anim_time_ms);
uint16_t lv_tabview_get_anim_time(lv_obj_t * tabview);
/**
* Get a style of a tab view

View File

@@ -467,7 +467,7 @@ static void lv_win_realign(lv_obj_t * win)
bool first_btn = true;
lv_obj_t *btn;
lv_obj_t *btn_prev;
lv_obj_t *btn_prev = NULL;
/*Refresh the size of all control buttons*/
btn = lv_obj_get_child_back(ext->header, NULL);
btn = lv_obj_get_child_back(ext->header, btn); /*Skip the title*/