mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-11-30 11:08:34 +08:00
fix warnings
This commit is contained in:
parent
71dfd1ad79
commit
af7e94b347
@ -631,7 +631,10 @@ static ret_t debugger_fscript_log_ex(void* ctx, const char* msg, bool_t native)
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
static ret_t debugger_fscript_log(void* ctx, tk_log_level_t level, const char* msg) {
|
||||
static ret_t debugger_fscript_log(void* ctx, tk_log_level_t level, const char* format, va_list ap) {
|
||||
char msg[1024] = {0};
|
||||
tk_vsnprintf(msg, sizeof(msg)-1, format, ap);
|
||||
|
||||
return debugger_fscript_log_ex(ctx, msg, TRUE);
|
||||
}
|
||||
|
||||
|
@ -93,7 +93,6 @@ static ret_t dialog_highlighter_default_draw_mask_window(dialog_highlighter_t* h
|
||||
if (alpha > 1) {
|
||||
uint32_t i = 0;
|
||||
void* arges[2];
|
||||
widget_t* widget = window_manager();
|
||||
dialog_highlighter_default_t* dh = (dialog_highlighter_default_t*)h;
|
||||
|
||||
if (slist_is_empty(&dh->win_mask_rect_list)) {
|
||||
@ -123,7 +122,6 @@ static ret_t dialog_highlighter_default_draw_mask_system_bar(dialog_highlighter_
|
||||
uint8_t alpha, bool_t is_clip_rect) {
|
||||
if (alpha > 1) {
|
||||
uint32_t i = 0;
|
||||
widget_t* widget = window_manager();
|
||||
color_t mask = color_init(0, 0, 0, alpha);
|
||||
dialog_highlighter_default_t* dh = (dialog_highlighter_default_t*)h;
|
||||
for (i = 0; i < dh->system_bar_top_clip_rects.size; i++) {
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
static ret_t mledit_init(widget_t* widget);
|
||||
static ret_t mledit_update_status(widget_t* widget);
|
||||
static ret_t mledit_dispatch_event(widget_t* widget, event_type_t type);
|
||||
static ret_t mledit_dispatch_event(widget_t* widget, uint32_t type);
|
||||
|
||||
static ret_t mledit_save_text(widget_t* widget) {
|
||||
mledit_t* mledit = MLEDIT(widget);
|
||||
@ -69,7 +69,7 @@ static ret_t mledit_commit_text(widget_t* widget) {
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
static ret_t mledit_dispatch_event(widget_t* widget, event_type_t type) {
|
||||
static ret_t mledit_dispatch_event(widget_t* widget, uint32_t type) {
|
||||
value_change_event_t evt;
|
||||
mledit_t* mledit = MLEDIT(widget);
|
||||
wstr_t* text = &(widget->text);
|
||||
|
@ -950,6 +950,8 @@ ret_t serial_config(serial_handle_t handle, uint32_t baudrate, bytesize_t bytesi
|
||||
byte_time_ns += ((1.5 - stopbits_one_point_five) * bit_time_ns);
|
||||
}
|
||||
|
||||
(void)bit_time_ns;
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
|
@ -1510,7 +1510,7 @@ ret_t value_bit_or(value_t* v, value_t* other, value_t* result) {
|
||||
type = tk_max_int((int)(v->type), (int)(other->type));
|
||||
switch (type) {
|
||||
case VALUE_TYPE_BOOL: {
|
||||
bool_t vv = value_bool(v) | value_bool(other);
|
||||
bool_t vv = value_bool(v) || value_bool(other);
|
||||
value_set_bool(result, vv);
|
||||
break;
|
||||
}
|
||||
@ -1573,7 +1573,7 @@ ret_t value_bit_and(value_t* v, value_t* other, value_t* result) {
|
||||
type = tk_max_int((int)(v->type), (int)(other->type));
|
||||
switch (type) {
|
||||
case VALUE_TYPE_BOOL: {
|
||||
bool_t vv = value_bool(v) & value_bool(other);
|
||||
bool_t vv = value_bool(v) && value_bool(other);
|
||||
value_set_bool(result, vv);
|
||||
break;
|
||||
}
|
||||
|
@ -98,7 +98,6 @@ static ret_t vgcanvas_nanovg_destroy_fbo(vgcanvas_t* vgcanvas, framebuffer_objec
|
||||
|
||||
static ret_t vgcanvas_nanovg_bind_fbo(vgcanvas_t* vgcanvas, framebuffer_object_t* fbo) {
|
||||
NVGcontext* vg = NULL;
|
||||
system_info_t* info = system_info();
|
||||
vgcanvas_nanovg_t* canvas = (vgcanvas_nanovg_t*)vgcanvas;
|
||||
NVGLUframebuffer* handle = (NVGLUframebuffer*)fbo->handle;
|
||||
|
||||
@ -131,7 +130,6 @@ static ret_t vgcanvas_nanovg_bind_fbo(vgcanvas_t* vgcanvas, framebuffer_object_t
|
||||
static ret_t vgcanvas_nanovg_unbind_fbo(vgcanvas_t* vgcanvas, framebuffer_object_t* fbo) {
|
||||
uint32_t w, h;
|
||||
NVGcontext* vg = NULL;
|
||||
system_info_t* info = system_info();
|
||||
vgcanvas_nanovg_t* canvas = (vgcanvas_nanovg_t*)vgcanvas;
|
||||
NVGLUframebuffer* handle = (NVGLUframebuffer*)fbo->handle;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user