remove unused warnings

This commit is contained in:
lixianjing 2023-02-09 17:19:53 +08:00
parent 8294515fc0
commit 40d7e12b34
2 changed files with 7 additions and 3 deletions

View File

@ -1,5 +1,8 @@
# 最新动态
2023/02/09
* 去除设置hscroll_label控件文本时打印的不必要的警告信息(感谢雨欣提供补丁)
2023/02/08
* 是修复 awtk 在 OpenGL 下,使用离线画布后,把离线画布的位图数据,通过 draw_image 函数绘图后,马上释放离线画布,会导致绘图异常的情况(感谢智明提供补丁)。

View File

@ -421,10 +421,11 @@ static ret_t hscroll_label_on_timer(const timer_info_t* info) {
ret_t hscroll_label_start(widget_t* widget) {
hscroll_label_t* hscroll_label = HSCROLL_LABEL(widget);
return_value_if_fail(hscroll_label != NULL, RET_BAD_PARAMS);
return_value_if_fail(hscroll_label->timer_id == TK_INVALID_ID, RET_BAD_PARAMS);
hscroll_label->elapsed = 0;
hscroll_label->timer_id = widget_add_timer(widget, hscroll_label_on_timer, 16);
if (hscroll_label->timer_id == TK_INVALID_ID) {
hscroll_label->elapsed = 0;
hscroll_label->timer_id = widget_add_timer(widget, hscroll_label_on_timer, 16);
}
return RET_OK;
}