From fcc9d469d26ce1df6da644dcd29c670e7e9bcdad Mon Sep 17 00:00:00 2001 From: lixianjing Date: Wed, 27 Nov 2019 09:28:25 +0800 Subject: [PATCH] fix warnings --- src/base/dialog.c | 2 +- src/base/ffr_draw_rounded_rect.inc | 18 +++++++++--------- src/base/window_manager.c | 3 ++- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/base/dialog.c b/src/base/dialog.c index 616213b4e..4f5982aa0 100644 --- a/src/base/dialog.c +++ b/src/base/dialog.c @@ -177,7 +177,7 @@ ret_t dialog_quit(widget_t* widget, uint32_t code) { return_value_if_fail(dialog != NULL && !(dialog->quited), RET_BAD_PARAMS); dialog->quited = TRUE; - dialog->quit_code = code; + dialog->quit_code = (dialog_quit_code_t)code; main_loop_quit(main_loop()); #endif /*AWTK_WEB*/ diff --git a/src/base/ffr_draw_rounded_rect.inc b/src/base/ffr_draw_rounded_rect.inc index 07f625222..27fdb31d3 100644 --- a/src/base/ffr_draw_rounded_rect.inc +++ b/src/base/ffr_draw_rounded_rect.inc @@ -1,4 +1,4 @@ -/** +/** * History: * ================================================================ * 2019-11-22 luozhiming@zlg.cn created @@ -604,13 +604,13 @@ static void widget_darw_fill_rounded_rect(canvas_t* c, rect_t* r, color_t* color Wu_D_Circle(radius, &point_list_45, point_pix_cache_list); - widget_draw_arc_point_list(&image_info, c, v_x2, v_y1, x2, y1, angle_h, angle_v, radius, 0, color, + widget_draw_arc_point_list(&image_info, c, v_x2, v_y1, x2, y1, angle_h, angle_v, radius, (frr_quadrant_t)0, color, &tmp_point_list_45, &point_list_45, TRUE); // 右上角 - widget_draw_arc_point_list(&image_info, c, v_x1, v_y1, x1, y1, angle_h, angle_v, radius, 1, color, + widget_draw_arc_point_list(&image_info, c, v_x1, v_y1, x1, y1, angle_h, angle_v, radius, (frr_quadrant_t)1, color, &tmp_point_list_45, &point_list_45, TRUE); // 左上角 - widget_draw_arc_point_list(&image_info, c, v_x1, v_y2, x1, y2, angle_h, angle_v, radius, 2, color, + widget_draw_arc_point_list(&image_info, c, v_x1, v_y2, x1, y2, angle_h, angle_v, radius, (frr_quadrant_t)2, color, &tmp_point_list_45, &point_list_45, TRUE); // 左下角 - widget_draw_arc_point_list(&image_info, c, v_x2, v_y2, x2, y2, angle_h, angle_v, radius, 3, color, + widget_draw_arc_point_list(&image_info, c, v_x2, v_y2, x2, y2, angle_h, angle_v, radius, (frr_quadrant_t)3, color, &tmp_point_list_45, &point_list_45, TRUE); // 右下角 #endif // WITH_NANOVG_GPU @@ -701,13 +701,13 @@ static void widget_darw_stroke_rounded_rect(canvas_t* c, rect_t* r, color_t* col widget_image_info_create(&image_info, (unsigned char*)vg->buff, vg->w, vg->h, vg->format); - widget_draw_arc_point_list(&image_info, c, v_x2, v_y1, x2, y1, angle_h, angle_v, radius, 0, + widget_draw_arc_point_list(&image_info, c, v_x2, v_y1, x2, y1, angle_h, angle_v, radius, (frr_quadrant_t)0, color, &tmp_point_list_45, &point_list_45, FALSE); // 右上角 - widget_draw_arc_point_list(&image_info, c, v_x1, v_y1, x1, y1, angle_h, angle_v, radius, 1, + widget_draw_arc_point_list(&image_info, c, v_x1, v_y1, x1, y1, angle_h, angle_v, radius, (frr_quadrant_t)1, color, &tmp_point_list_45, &point_list_45, FALSE); // 左上角 - widget_draw_arc_point_list(&image_info, c, v_x1, v_y2, x1, y2, angle_h, angle_v, radius, 2, + widget_draw_arc_point_list(&image_info, c, v_x1, v_y2, x1, y2, angle_h, angle_v, radius, (frr_quadrant_t)2, color, &tmp_point_list_45, &point_list_45, FALSE); // 左下角 - widget_draw_arc_point_list(&image_info, c, v_x2, v_y2, x2, y2, angle_h, angle_v, radius, 3, + widget_draw_arc_point_list(&image_info, c, v_x2, v_y2, x2, y2, angle_h, angle_v, radius, (frr_quadrant_t)3, color, &tmp_point_list_45, &point_list_45, FALSE); // 右下角 if (mid_lenght_v != 0) { diff --git a/src/base/window_manager.c b/src/base/window_manager.c index 96979df5f..851b09d52 100644 --- a/src/base/window_manager.c +++ b/src/base/window_manager.c @@ -1,4 +1,4 @@ -/** +/** * File: window_manager.c * Author: AWTK Develop Team * Brief: window manager @@ -22,6 +22,7 @@ #include "base/widget.h" #include "base/canvas.h" #include "base/dialog.h" +#include "base/window.h" #include "base/dialog_highlighter.h" #include "base/input_device_status.h" #include "base/window_manager.h"