diff --git a/demos/demo_ui_app.c b/demos/demo_ui_app.c index 1c804d6e2..e5951cd4f 100644 --- a/demos/demo_ui_app.c +++ b/demos/demo_ui_app.c @@ -71,12 +71,14 @@ uint32_t tk_mem_speed_test(void* buffer, uint32_t length, uint32_t* pmemcpy_spee static ret_t window_to_background(void* ctx, event_t* e) { widget_t* win = WIDGET(e->target); log_debug("%s to_background\n", win->name); + (void)win; return RET_OK; } static ret_t window_to_foreground(void* ctx, event_t* e) { widget_t* win = WIDGET(e->target); log_debug("%s to_foreground\n", win->name); + (void)win; return RET_OK; } diff --git a/src/base/assets_manager.c b/src/base/assets_manager.c index 3da125354..f689cd017 100644 --- a/src/base/assets_manager.c +++ b/src/base/assets_manager.c @@ -1,4 +1,4 @@ -/** +/** * File: assets_manager.h * Author: AWTK Develop Team * Brief: asset manager @@ -42,12 +42,6 @@ static int asset_cache_cmp_type(const void* a, const void* b) { static assets_manager_t* s_assets_manager = NULL; -static system_info_t* assets_manager_get_system_info(assets_manager_t* am) { - return_value_if_fail(am != NULL, NULL); - - return am->system_info != NULL ? am->system_info : system_info(); -} - static locale_info_t* assets_manager_get_locale_info(assets_manager_t* am) { return_value_if_fail(am != NULL, NULL); @@ -72,6 +66,12 @@ asset_info_t* assets_manager_load(assets_manager_t* am, asset_type_t type, const #elif defined(WITH_FS_RES) #include "tkc/fs.h" +static system_info_t* assets_manager_get_system_info(assets_manager_t* am) { + return_value_if_fail(am != NULL, NULL); + + return am->system_info != NULL ? am->system_info : system_info(); +} + static const char* assets_manager_get_res_root(assets_manager_t* am) { if (am->res_root != NULL) { return am->res_root; @@ -478,6 +478,7 @@ const asset_info_t* assets_manager_ref(assets_manager_t* am, asset_type_t type, const key_type_value_t* kv = asset_type_find_by_value(type); const char* asset_type = kv != NULL ? kv->name : "unknown"; log_warn("!!!Asset [name=%s type=%s] not exist!!!\n", name, asset_type); + (void)asset_type; } return info; diff --git a/src/ext_widgets/keyboard/candidates.c b/src/ext_widgets/keyboard/candidates.c index 000bc2465..d43fa2696 100644 --- a/src/ext_widgets/keyboard/candidates.c +++ b/src/ext_widgets/keyboard/candidates.c @@ -1,4 +1,4 @@ -/** +/** * File: candidates.c * Author: AWTK Develop Team * Brief: candidates @@ -87,7 +87,6 @@ static ret_t candidates_relayout_children(widget_t* widget) { uint32_t i = 0; xy_t margin = 2; wh_t child_w = 0; - wh_t w = widget->w; xy_t child_x = margin; xy_t child_y = margin; widget_t* iter = NULL; diff --git a/src/ext_widgets/scroll_view/scroll_view.c b/src/ext_widgets/scroll_view/scroll_view.c index 7e35d4a8d..4af4592f7 100644 --- a/src/ext_widgets/scroll_view/scroll_view.c +++ b/src/ext_widgets/scroll_view/scroll_view.c @@ -1,4 +1,4 @@ -/** +/** * File: scroll_view.c * Author: AWTK Develop Team * Brief: scroll_view @@ -284,7 +284,6 @@ static ret_t scroll_view_notify_scrolled(scroll_view_t* scroll_view) { } static ret_t scroll_view_on_pointer_move(scroll_view_t* scroll_view, pointer_event_t* e) { - widget_t* widget = WIDGET(scroll_view); velocity_t* v = &(scroll_view->velocity); int32_t dx = e->x - scroll_view->down.x; int32_t dy = e->y - scroll_view->down.y; diff --git a/src/ext_widgets/slide_view/slide_indicator.c b/src/ext_widgets/slide_view/slide_indicator.c index 72ab6415d..e0c1e1faf 100644 --- a/src/ext_widgets/slide_view/slide_indicator.c +++ b/src/ext_widgets/slide_view/slide_indicator.c @@ -1,4 +1,4 @@ -/** +/** * File: slide_indicator.h * Author: AWTK Develop Team * Brief: slide_indicator @@ -22,6 +22,7 @@ #include "tkc/mem.h" #include "tkc/utils.h" #include "base/timer.h" +#include "base/layout.h" #include "base/enums.h" #include "tkc/easing.h" #include "tkc/func_call_parser.h" @@ -285,9 +286,8 @@ static ret_t slide_indicator_paint_arc(widget_t* widget, canvas_t* c) { float_t cy = slide_indicator->anchor_y; uint32_t nr = slide_indicator->max; float_t margin = slide_indicator->margin; - float_t spacing = (slide_indicator->spacing / 180.0 * M_PI); + float_t spacing = (slide_indicator->spacing / 180.0f * M_PI); uint32_t size = slide_indicator->size; - uint32_t half_size = size >> 1; float_t radius = _DISTANCE(cx, cy, widget->w / 2, widget->h / 2) - margin - size / 2; float_t center = _RADIAN(cx, cy, widget->w / 2, widget->h / 2); float_t offset = 0; diff --git a/src/xml/xml_parser.c b/src/xml/xml_parser.c index 71f68985d..b27327786 100644 --- a/src/xml/xml_parser.c +++ b/src/xml/xml_parser.c @@ -45,7 +45,6 @@ struct _XmlParser { }; static const char* strtrim(char* str); -static void xml_parser_parse_entity(XmlParser* thiz); static void xml_parser_parse_start_tag(XmlParser* thiz); static void xml_parser_parse_end_tag(XmlParser* thiz); static void xml_parser_parse_comment(XmlParser* thiz);