diff --git a/legacy/edje/src/bin/edje_player.c b/legacy/edje/src/bin/edje_player.c index dbb775fe53..e220f41960 100644 --- a/legacy/edje/src/bin/edje_player.c +++ b/legacy/edje/src/bin/edje_player.c @@ -168,7 +168,7 @@ struct slave_cmd {NULL, NULL} }; -static int +static Eina_Bool _slave_mode(void *data, Ecore_Fd_Handler *fd_handler) { Evas_Object *edje = data; @@ -180,23 +180,23 @@ _slave_mode(void *data, Ecore_Fd_Handler *fd_handler) { fputs("ERROR: error on stdin! Exit.\n", stderr); ecore_main_loop_quit(); - return 0; + return ECORE_CALLBACK_CANCEL; } if (!ecore_main_fd_handler_active_get(fd_handler, ECORE_FD_READ)) - return 1; + return ECORE_CALLBACK_RENEW; if (!fgets(buf, sizeof(buf), stdin)) { fputs("ERROR: end of stdin! Exit.\n", stderr); ecore_main_loop_quit(); - return 0; + return ECORE_CALLBACK_CANCEL; } len = strlen(buf); if (len < 1) { fputs("ERROR: no input! Try: help\n", stderr); - return 1; + return ECORE_CALLBACK_RENEW; } if (buf[len - 1] == '\n') { @@ -235,7 +235,7 @@ _slave_mode(void *data, Ecore_Fd_Handler *fd_handler) } } - return 1; + return ECORE_CALLBACK_RENEW; } static void @@ -508,7 +508,7 @@ _create_edje(Evas *evas, const struct opts *opts) return edje; } -static unsigned char _parse_color(const Ecore_Getopt *parser, const Ecore_Getopt_Desc *desc, const char *str, void *data, Ecore_Getopt_Value *storage) +static unsigned char _parse_color(__UNUSED__ const Ecore_Getopt *parser, __UNUSED__ const Ecore_Getopt_Desc *desc, const char *str, __UNUSED__ void *data, Ecore_Getopt_Value *storage) { unsigned char *color = (unsigned char *)storage->ptrp; @@ -521,7 +521,7 @@ static unsigned char _parse_color(const Ecore_Getopt *parser, const Ecore_Getop return 1; } -static void _cb_delete (Ecore_Evas *ee) +static void _cb_delete(__UNUSED__ Ecore_Evas *ee) { ecore_main_loop_quit(); } @@ -720,7 +720,6 @@ int main(int argc, char **argv) ecore_evas_show(win); ecore_main_loop_begin(); - end_win: ecore_evas_free(win); end: edje_shutdown(); diff --git a/legacy/edje/src/lib/edje_callbacks.c b/legacy/edje/src/lib/edje_callbacks.c index ffc281ddc8..155561980b 100644 --- a/legacy/edje/src/lib/edje_callbacks.c +++ b/legacy/edje/src/lib/edje_callbacks.c @@ -24,7 +24,7 @@ _edje_hold_signal_cb(void *data, Evas * e, Evas_Object * obj, void *event_info) } static void -_edje_focus_in_signal_cb(void *data, Evas * e, Evas_Object * obj, void *event_info) +_edje_focus_in_signal_cb(void *data, Evas * e, Evas_Object * obj, __UNUSED__ void *event_info) { Edje *ed; Edje_Real_Part *rp; @@ -40,7 +40,7 @@ _edje_focus_in_signal_cb(void *data, Evas * e, Evas_Object * obj, void *event_in } static void -_edje_focus_out_signal_cb(void *data, Evas * e, Evas_Object * obj, void *event_info) +_edje_focus_out_signal_cb(void *data, Evas * e, Evas_Object * obj, __UNUSED__ void *event_info) { Edje *ed; Edje_Real_Part *rp; @@ -375,8 +375,8 @@ _edje_mouse_wheel_signal_cb(void *data, Evas * e, Evas_Object * obj, void *event e = NULL; } -int -_edje_timer_cb(void *data) +Eina_Bool +_edje_timer_cb(__UNUSED__ void *data) { double t; Eina_List *l; @@ -445,13 +445,12 @@ _edje_timer_cb(void *data) _edje_thaw(ed); _edje_unref(ed); } - if (_edje_anim_count > 0) return 1; + if (_edje_anim_count > 0) return ECORE_CALLBACK_RENEW; _edje_timer = NULL; - return 0; - data = NULL; + return ECORE_CALLBACK_CANCEL; } -int +Eina_Bool _edje_pending_timer_cb(void *data) { Edje_Pending_Program *pp; @@ -460,7 +459,7 @@ _edje_pending_timer_cb(void *data) pp->edje->pending_actions = eina_list_remove(pp->edje->pending_actions, pp); _edje_program_run(pp->edje, pp->program, 1, "", ""); free(pp); - return 0; + return ECORE_CALLBACK_CANCEL; } void diff --git a/legacy/edje/src/lib/edje_edit.c b/legacy/edje/src/lib/edje_edit.c index 4cea5780ad..4e279a5c6e 100644 --- a/legacy/edje/src/lib/edje_edit.c +++ b/legacy/edje/src/lib/edje_edit.c @@ -5075,7 +5075,7 @@ edje_edit_spectra_stop_num_set(Evas_Object *obj, const char* spectra, int num) s = _edje_edit_spectrum_entry_get(ed, spectra); if (!s) return EINA_FALSE; - if (num == eina_list_count(s->color_list)) return EINA_TRUE; + if (num == (int) eina_list_count(s->color_list)) return EINA_TRUE; //destroy all colors while (s->color_list) diff --git a/legacy/edje/src/lib/edje_embryo.c b/legacy/edje/src/lib/edje_embryo.c index 873516ad9d..b90bc11b7a 100644 --- a/legacy/edje/src/lib/edje_embryo.c +++ b/legacy/edje/src/lib/edje_embryo.c @@ -291,7 +291,7 @@ _edje_embryo_fn_get_str(Embryo_Program *ep, Embryo_Cell *params) s = (char *)_edje_var_str_get(ed, (int)params[1]); if (s) { - if (strlen(s) < params[3]) + if ((int) strlen(s) < params[3]) { SETSTR(s, params[2]); } @@ -514,7 +514,7 @@ _edje_embryo_fn_fetch_str(Embryo_Program *ep, Embryo_Cell *params) (int) params[2]); if (s) { - if (strlen(s) < params[4]) + if ((int) strlen(s) < params[4]) { SETSTR(s, params[3]); } @@ -875,7 +875,7 @@ _edje_embryo_fn_get_state(Embryo_Program *ep, Embryo_Cell *params) s = rp->chosen_description->state.name; if (s) { - if (strlen(s) < params[3]) + if ((int) strlen(s) < params[3]) { SETSTR(s, params[2]); } @@ -1091,7 +1091,7 @@ _edje_embryo_fn_get_text(Embryo_Program *ep, Embryo_Cell *params) s = (char *)edje_object_part_text_get(ed->obj, rp->part->name); if (s) { - if (strlen(s) < params[3]) + if ((int) strlen(s) < params[3]) { SETSTR(s, params[2]); } @@ -1330,7 +1330,7 @@ _edje_embryo_fn_send_message(Embryo_Program *ep, Embryo_Cell *params) int id, i, n; Embryo_Cell *ptr; - if (params[0] < (sizeof(Embryo_Cell) * (2))) return 0; + if (params[0] < (int) (sizeof(Embryo_Cell) * (2))) return 0; ed = embryo_program_data_get(ep); type = params[1]; id = params[2]; @@ -1641,7 +1641,7 @@ _edje_embryo_fn_set_state_val(Embryo_Program *ep, Embryo_Cell *params) char *s; /* we need at least 3 arguments */ - if (params[0] < (sizeof(Embryo_Cell) * 3)) + if (params[0] < (int) (sizeof(Embryo_Cell) * 3)) return 0; if (params[1] < 0) @@ -1998,7 +1998,7 @@ _edje_embryo_fn_get_state_val(Embryo_Program *ep, Embryo_Cell *params) char *s; /* we need at least 3 arguments */ - if (params[0] < (sizeof(Embryo_Cell) * 3)) + if (params[0] < (int) (sizeof(Embryo_Cell) * 3)) return 0; if (params[1] < 0) diff --git a/legacy/edje/src/lib/edje_entry.c b/legacy/edje/src/lib/edje_entry.c index a75a993a79..3f3536fefc 100644 --- a/legacy/edje/src/lib/edje_entry.c +++ b/legacy/edje/src/lib/edje_entry.c @@ -29,9 +29,9 @@ void *alloca (size_t); #ifdef HAVE_ECORE_IMF static int _edje_entry_imf_retrieve_surrounding_cb(void *data, Ecore_IMF_Context *ctx, char **text, int *cursor_pos); -static int _edje_entry_imf_event_commit_cb(void *data, int type, void *event); -static int _edje_entry_imf_event_changed_cb(void *data, int type, void *event); -static int _edje_entry_imf_event_delete_surrounding_cb(void *data, int type, void *event); +static Eina_Bool _edje_entry_imf_event_commit_cb(void *data, int type, void *event); +static Eina_Bool _edje_entry_imf_event_changed_cb(void *data, int type, void *event); +static Eina_Bool _edje_entry_imf_event_delete_surrounding_cb(void *data, int type, void *event); #endif typedef struct _Entry Entry; @@ -1814,7 +1814,7 @@ _edje_part_mouse_move_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUS } static void -_evas_focus_in_cb(void *data, Evas *e, void *event_info) +_evas_focus_in_cb(void *data, Evas *e, __UNUSED__ void *event_info) { Edje *ed = (Edje *)data; @@ -1824,7 +1824,7 @@ _evas_focus_in_cb(void *data, Evas *e, void *event_info) } static void -_evas_focus_out_cb(void *data, Evas *e, void *event_info) +_evas_focus_out_cb(void *data, Evas *e, __UNUSED__ void *event_info) { Edje *ed = (Edje *)data; @@ -2680,7 +2680,7 @@ _edje_entry_imf_retrieve_surrounding_cb(void *data, Ecore_IMF_Context *ctx __UNU return 1; } -static int +static Eina_Bool _edje_entry_imf_event_commit_cb(void *data, int type __UNUSED__, void *event) { Edje* ed = data; @@ -2688,15 +2688,15 @@ _edje_entry_imf_event_commit_cb(void *data, int type __UNUSED__, void *event) Entry *en; Ecore_IMF_Event_Commit *ev = event; int i; - - if (!rp) return 1; - + + if (!rp) return ECORE_CALLBACK_PASS_ON; + en = rp->entry_data; if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) || (rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_SELECTABLE)) - return 1; - - if (en->imf_context != ev->ctx) return 1; + return ECORE_CALLBACK_PASS_ON; + + if (en->imf_context != ev->ctx) return ECORE_CALLBACK_PASS_ON; if (en->have_composition) { @@ -2713,11 +2713,11 @@ _edje_entry_imf_event_commit_cb(void *data, int type __UNUSED__, void *event) _anchors_get(en->cursor, rp->object, en); _edje_emit(rp->edje, "entry,changed", rp->part->name); _edje_emit(ed, "cursor,changed", rp->part->name); - - return 0; + + return ECORE_CALLBACK_DONE; } -static int +static Eina_Bool _edje_entry_imf_event_changed_cb(void *data, int type __UNUSED__, void *event) { Edje* ed = data; @@ -2728,23 +2728,23 @@ _edje_entry_imf_event_changed_cb(void *data, int type __UNUSED__, void *event) int i; char *preedit_string; - if (!rp) return 1; + if (!rp) return ECORE_CALLBACK_PASS_ON; en = rp->entry_data; if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) || (rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_SELECTABLE)) - return 1; - - if (!en->imf_context) return 1; - - if (en->imf_context != ev->ctx) return 1; + return ECORE_CALLBACK_PASS_ON; + + if (!en->imf_context) return ECORE_CALLBACK_PASS_ON; + + if (en->imf_context != ev->ctx) return ECORE_CALLBACK_PASS_ON; ecore_imf_context_preedit_string_get(en->imf_context, &preedit_string, &length); // FIXME : check the maximum length of evas_textblock if ( 0 /* check the maximum length of evas_textblock */ ) - return 1; - + return ECORE_CALLBACK_PASS_ON; + if (en->have_composition) { // delete the composing characters @@ -2762,33 +2762,33 @@ _edje_entry_imf_event_changed_cb(void *data, int type __UNUSED__, void *event) //xx evas_object_textblock_text_markup_prepend(en->cursor, preedit_string); - + _sel_extend(en->cursor, rp->object, en); _curs_update_from_curs(en->cursor, rp->object, en); _anchors_get(en->cursor, rp->object, en); _edje_emit(rp->edje, "entry,changed", rp->part->name); _edje_emit(ed, "cursor,changed", rp->part->name); - - return 0; + + return ECORE_CALLBACK_DONE; } -static int +static Eina_Bool _edje_entry_imf_event_delete_surrounding_cb(void *data, int type __UNUSED__, void *event) { Edje *ed = data; Edje_Real_Part *rp = ed->focused_part; Entry *en; Ecore_IMF_Event_Delete_Surrounding *ev = event; - - if (!rp) return 1; + + if (!rp) return ECORE_CALLBACK_PASS_ON; en = rp->entry_data; if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) || (rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_SELECTABLE)) - return 1; - - if (en->imf_context != ev->ctx) return 1; - - return 0; + return ECORE_CALLBACK_PASS_ON; + + if (en->imf_context != ev->ctx) return ECORE_CALLBACK_PASS_ON; + + return ECORE_CALLBACK_DONE; } #endif diff --git a/legacy/edje/src/lib/edje_external.c b/legacy/edje/src/lib/edje_external.c index 8a8eea5192..c7bd86653f 100644 --- a/legacy/edje/src/lib/edje_external.c +++ b/legacy/edje/src/lib/edje_external.c @@ -619,8 +619,8 @@ _edje_external_params_free(Eina_List *external_params, Eina_Bool free_strings) void _edje_external_recalc_apply(Edje *ed, Edje_Real_Part *ep, - Edje_Calc_Params *params, - Edje_Part_Description *chosen_desc) + Edje_Calc_Params *params, + Edje_Part_Description *chosen_desc) { Edje_External_Type *type; void *params1, *params2 = NULL; diff --git a/legacy/edje/src/lib/edje_lua.c b/legacy/edje/src/lib/edje_lua.c index d0480fe360..4c6e539a79 100644 --- a/legacy/edje/src/lib/edje_lua.c +++ b/legacy/edje/src/lib/edje_lua.c @@ -231,7 +231,7 @@ struct _Edje_Lua_Edje_Part_Description jmp_buf _edje_lua_panic_jmp; static int -_edje_lua_custom_panic(lua_State *L) +_edje_lua_custom_panic(__UNUSED__ lua_State *L) { printf("PANIC\n"); longjmp(_edje_lua_panic_jmp, 1); @@ -846,13 +846,13 @@ const Edje_Lua_Reg *cTimer[] = { NULL // sentinel }; -static int +static Eina_Bool _edje_lua_timer_cb(void *data) { Edje_Lua_Timer *obj = data; lua_State *L = obj->L; int err_code; - int res; + Eina_Bool res; _edje_lua_get_ref(L, obj->cb); // callback function _edje_lua_get_reg(L, obj); @@ -860,7 +860,7 @@ _edje_lua_timer_cb(void *data) if ((err_code = lua_pcall(L, 1, 1, 0))) { _edje_lua_error(L, err_code); - return 0; + return ECORE_CALLBACK_CANCEL; } res = luaL_optint(L, -1, ECORE_CALLBACK_CANCEL); @@ -1042,10 +1042,11 @@ const Edje_Lua_Reg *cAnimator[] = { NULL // sentinel }; -static int +static Eina_Bool _edje_lua_animator_cb(void *data) { - int err, res; + Eina_Bool res; + int err; Edje_Lua_Animator *obj = data; lua_State *L = obj->L; @@ -1055,7 +1056,7 @@ _edje_lua_animator_cb(void *data) if ((err = lua_pcall(L, 1, 1, 0))) { _edje_lua_error(L, err); - return 0; + return ECORE_CALLBACK_CANCEL; } res = luaL_checkint(L, -1); @@ -1150,10 +1151,11 @@ const Edje_Lua_Reg *cPoller[] = { NULL // sentinel }; -static int +static Eina_Bool _edje_lua_poller_cb(void *data) { - int err, res; + Eina_Bool res; + int err; Edje_Lua_Poller *obj = data; lua_State *L = obj->L; @@ -1163,7 +1165,7 @@ _edje_lua_poller_cb(void *data) if ((err = lua_pcall(L, 1, 1, 0))) { _edje_lua_error(L, err); - return 0; + return ECORE_CALLBACK_CANCEL; } res = luaL_checkint(L, -1); @@ -1456,8 +1458,7 @@ const Edje_Lua_Reg mObject = { }; static void -_edje_lua_object_del_cb(void *data, Evas * e, Evas_Object * obj, - void *event_info) +_edje_lua_object_del_cb(void *data, __UNUSED__ Evas * e, Evas_Object * obj, __UNUSED__ void *event_info) { //printf("_edje_lua_object_delete_cb\n"); lua_State *L = data; @@ -2206,7 +2207,7 @@ _edje_lua_object_set_precise_is_inside(lua_State *L) lua_insert(L, -2); static void -_edje_lua_object_cb_mouse_in(void *data, Evas * e, Evas_Object * obj, +_edje_lua_object_cb_mouse_in(void *data, __UNUSED__ Evas * e, Evas_Object * obj, void *event_info) { OBJECT_CB_MACRO("mouse_in"); @@ -2223,7 +2224,7 @@ _edje_lua_object_cb_mouse_in(void *data, Evas * e, Evas_Object * obj, } static void -_edje_lua_object_cb_mouse_out(void *data, Evas * e, Evas_Object * obj, +_edje_lua_object_cb_mouse_out(void *data, __UNUSED__ Evas * e, Evas_Object * obj, void *event_info) { OBJECT_CB_MACRO("mouse_out"); @@ -2240,7 +2241,7 @@ _edje_lua_object_cb_mouse_out(void *data, Evas * e, Evas_Object * obj, } static void -_edje_lua_object_cb_mouse_down(void *data, Evas * e, Evas_Object * obj, +_edje_lua_object_cb_mouse_down(void *data, __UNUSED__ Evas * e, Evas_Object * obj, void *event_info) { OBJECT_CB_MACRO("mouse_down"); @@ -2258,7 +2259,7 @@ _edje_lua_object_cb_mouse_down(void *data, Evas * e, Evas_Object * obj, } static void -_edje_lua_object_cb_mouse_up(void *data, Evas * e, Evas_Object * obj, +_edje_lua_object_cb_mouse_up(void *data, __UNUSED__ Evas * e, Evas_Object * obj, void *event_info) { OBJECT_CB_MACRO("mouse_up"); @@ -2276,7 +2277,7 @@ _edje_lua_object_cb_mouse_up(void *data, Evas * e, Evas_Object * obj, } static void -_edje_lua_object_cb_mouse_move(void *data, Evas * e, Evas_Object * obj, +_edje_lua_object_cb_mouse_move(void *data, __UNUSED__ Evas * e, Evas_Object * obj, void *event_info) { OBJECT_CB_MACRO("mouse_move"); @@ -2294,7 +2295,7 @@ _edje_lua_object_cb_mouse_move(void *data, Evas * e, Evas_Object * obj, } static void -_edje_lua_object_cb_mouse_wheel(void *data, Evas * e, Evas_Object * obj, +_edje_lua_object_cb_mouse_wheel(void *data, __UNUSED__ Evas * e, Evas_Object * obj, void *event_info) { OBJECT_CB_MACRO("mouse_wheel"); @@ -3936,8 +3937,8 @@ const Edje_Lua_Reg mPart = { }; static void -_edje_lua_edje_part_del_cb(void *data, Evas * e, Evas_Object * obj, - void *event_info) +_edje_lua_edje_part_del_cb(void *data, __UNUSED__ Evas * e, Evas_Object * obj, + __UNUSED__ void *event_info) { //printf("_edje_lua_object_delete_cb\n"); lua_State *L = data; @@ -5018,8 +5019,8 @@ _edje_lua_group_fn_poller(lua_State *L) } // Only 1 type of poller currently implemented in ecore - tar->ep = ecore_poller_add(ECORE_POLLER_CORE, interval, - _edje_lua_poller_cb, tar); + tar->ep = ecore_poller_add(ECORE_POLLER_CORE, interval, + _edje_lua_poller_cb, tar); tar->L = L; _edje_lua_new_reg(L, -1, tar); // freed in _edje_lua_poller_cb/del tar->cb = _edje_lua_new_ref(L, 3); // freed in _edje_lua_poller_cb/del diff --git a/legacy/edje/src/lib/edje_message_queue.c b/legacy/edje/src/lib/edje_message_queue.c index 6f8e86de7a..c7f22ba86d 100644 --- a/legacy/edje/src/lib/edje_message_queue.c +++ b/legacy/edje/src/lib/edje_message_queue.c @@ -156,10 +156,10 @@ edje_message_signal_process(void) } -static int +static Eina_Bool _edje_dummy_timer(void *data __UNUSED__) { - return 0; + return ECORE_CALLBACK_CANCEL; } static void @@ -176,7 +176,7 @@ _edje_job(void *data __UNUSED__) _injob--; } -static int +static Eina_Bool _edje_job_loss_timer(void *data __UNUSED__) { _job_loss_timer = NULL; @@ -184,7 +184,7 @@ _edje_job_loss_timer(void *data __UNUSED__) { _job = ecore_job_add(_edje_job, NULL); } - return 0; + return ECORE_CALLBACK_CANCEL; } void diff --git a/legacy/edje/src/lib/edje_private.h b/legacy/edje/src/lib/edje_private.h index 0cbefa7b02..a60ea9f784 100644 --- a/legacy/edje/src/lib/edje_private.h +++ b/legacy/edje/src/lib/edje_private.h @@ -1310,8 +1310,8 @@ void _edje_part_recalc_1(Edje *ed, Edje_Real_Part *ep); int _edje_part_dragable_calc(Edje *ed, Edje_Real_Part *ep, FLOAT_T *x, FLOAT_T *y); void _edje_dragable_pos_set(Edje *ed, Edje_Real_Part *ep, FLOAT_T x, FLOAT_T y); -int _edje_timer_cb(void *data); -int _edje_pending_timer_cb(void *data); +Eina_Bool _edje_timer_cb(void *data); +Eina_Bool _edje_pending_timer_cb(void *data); void _edje_callbacks_add(Evas_Object *obj, Edje *ed, Edje_Real_Part *rp); void _edje_callbacks_focus_add(Evas_Object *obj, Edje *ed, Edje_Real_Part *rp); void _edje_callbacks_del(Evas_Object *obj, Edje *ed); @@ -1520,18 +1520,20 @@ void _edje_embryo_globals_init(Edje *ed); Embryo_Cell *___cptr; \ if ((___cptr = embryo_data_address_get(ep, (par)))) { \ embryo_data_string_set(ep, str, ___cptr); } } -#define SETSTRALLOCATE(s) { \ - if (s) { \ - if (strlen((s)) < params[4]) { \ - SETSTR((s), params[3]); } \ - else { \ - char *ss; \ - ss = alloca(strlen((s)) + 1); \ - strcpy(ss, (s)); \ - ss[params[4] - 2] = 0; \ - SETSTR(ss, params[3]); } } \ - else \ - SETSTR("", params[3]); } +#define SETSTRALLOCATE(s) \ + { \ + if (s) { \ + if ((int) strlen((s)) < params[4]) { \ + SETSTR((s), params[3]); } \ + else { \ + char *ss; \ + ss = alloca(strlen((s)) + 1); \ + strcpy(ss, (s)); \ + ss[params[4] - 2] = 0; \ + SETSTR(ss, params[3]); } } \ + else \ + SETSTR("", params[3]); \ + } #define SETFLOAT(val, par) { \ float *___cptr; \ if ((___cptr = (float *)embryo_data_address_get(ep, (par)))) { \ diff --git a/legacy/edje/src/lib/edje_program.c b/legacy/edje/src/lib/edje_program.c index a497a61886..21387913e5 100644 --- a/legacy/edje/src/lib/edje_program.c +++ b/legacy/edje/src/lib/edje_program.c @@ -1071,11 +1071,7 @@ _edje_emit(Edje *ed, const char *sig, const char *src) { const char *partid; Evas_Object *child; - Eina_List *l; Edje *ed2 = NULL; - Eina_Bool number = EINA_TRUE; - unsigned int i; - int id; idx = strchr(newsig, EDJE_PART_PATH_SEPARATOR_INDEXR); diff --git a/legacy/edje/src/lib/edje_text.c b/legacy/edje/src/lib/edje_text.c index ea59e1675c..9cc67ea938 100644 --- a/legacy/edje/src/lib/edje_text.c +++ b/legacy/edje/src/lib/edje_text.c @@ -118,7 +118,7 @@ _edje_text_fit_x(Edje *ed, Edje_Real_Part *ep, sc = ed->scale; if (sc == ZERO) sc = _edje_scale; - + *free_text = 0; if (sw <= 1) return ""; @@ -161,7 +161,7 @@ _edje_text_fit_x(Edje *ed, Edje_Real_Part *ep, * FIXME: we might want to set a max string length somewhere... */ extra = 1 + 3 + 3; /* terminator, leading and trailing ellipsis */ - orig_len = MIN(orig_len, 8192 - extra); + orig_len = MIN(orig_len, ((size_t) 8192 - extra)); if (!(buf = malloc(orig_len + extra))) return text; @@ -216,7 +216,7 @@ _edje_text_fit_x(Edje *ed, Edje_Real_Part *ep, break; } } - else if ((c1 > 0 && c1 >= orig_len) || c2 == 0) + else if ((c1 > 0 && (size_t) c1 >= orig_len) || c2 == 0) { buf[0] = 0; break; @@ -256,7 +256,7 @@ _edje_text_font_get(const char *base, const char *new, char **free_later) font_len = strlen(new); aux = strchr(base_style, ','); - style_len = (aux) ? (aux - base_style) : strlen(base_style); + style_len = (aux) ? (aux - base_style) : (int) strlen(base_style); *free_later = malloc(font_len + style_len + 1); memcpy(*free_later, new, font_len); diff --git a/legacy/edje/src/lib/edje_util.c b/legacy/edje/src/lib/edje_util.c index 19ec3d6c80..821ec374ec 100644 --- a/legacy/edje/src/lib/edje_util.c +++ b/legacy/edje/src/lib/edje_util.c @@ -3936,15 +3936,15 @@ edje_object_part_table_clear(Evas_Object *obj, const char *part, Eina_Bool clear } static void -_edje_perspective_obj_del(void *data, Evas *e, Evas_Object *obj, void *event_info) +_edje_perspective_obj_del(void *data, __UNUSED__ Evas *e, __UNUSED__ Evas_Object *obj, __UNUSED__ void *event_info) { - Edje_Perspective *ps = data; + Edje_Perspective *ps = data; Evas_Object *o; - + EINA_LIST_FREE(ps->users, o) { Edje *ed; - + ed = evas_object_smart_data_get(o); if (!ed) continue; ed->persp = NULL; @@ -4693,17 +4693,15 @@ _edje_real_part_swallow_hints_update(Edje_Real_Part *rp) } void -_edje_object_part_swallow_changed_hints_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) +_edje_object_part_swallow_changed_hints_cb(void *data, __UNUSED__ Evas *e, __UNUSED__ Evas_Object *obj, __UNUSED__ void *event_info) { Edje_Real_Part *rp; - + rp = data; _edje_real_part_swallow_hints_update(rp); rp->edje->dirty = 1; _edje_recalc(rp->edje); return; - e = NULL; - event_info = NULL; } void @@ -4734,17 +4732,17 @@ _edje_real_part_swallow(Edje_Real_Part *rp, Evas_Object *obj_swallow) evas_object_clip_set(rp->swallowed_object, rp->clip_to->object); else evas_object_clip_set(rp->swallowed_object, rp->edje->clipper); evas_object_stack_above(rp->swallowed_object, rp->object); - evas_object_event_callback_add(rp->swallowed_object, + evas_object_event_callback_add(rp->swallowed_object, EVAS_CALLBACK_FREE, _edje_object_part_swallow_free_cb, rp->edje->obj); - evas_object_event_callback_add(rp->swallowed_object, + evas_object_event_callback_add(rp->swallowed_object, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _edje_object_part_swallow_changed_hints_cb, rp); - + _edje_real_part_swallow_hints_update(rp); - + if (rp->part->mouse_events) { _edje_callbacks_add(obj_swallow, rp->edje, rp); @@ -4793,7 +4791,7 @@ _edje_object_preload(Edje *ed) } static void -_edje_object_image_preload_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) +_edje_object_image_preload_cb(void *data, __UNUSED__ Evas *e, Evas_Object *obj, __UNUSED__ void *event_info) { Edje *ed = data; @@ -4802,7 +4800,7 @@ _edje_object_image_preload_cb(void *data, Evas *e, Evas_Object *obj, void *event } static void -_edje_object_signal_preload_cb(void *data, Evas_Object *obj, const char *emission, const char *source) +_edje_object_signal_preload_cb(void *data, Evas_Object *obj, __UNUSED__ const char *emission, __UNUSED__ const char *source) { Edje *ed = data; diff --git a/legacy/edje/src/lib/edje_var.c b/legacy/edje/src/lib/edje_var.c index 4ba8b362f4..a748faf27f 100644 --- a/legacy/edje/src/lib/edje_var.c +++ b/legacy/edje/src/lib/edje_var.c @@ -6,13 +6,13 @@ #include "edje_private.h" -static int _edje_var_timer_cb(void *data); -static int _edje_var_anim_cb(void *data); +static Eina_Bool _edje_var_timer_cb(void *data); +static Eina_Bool _edje_var_anim_cb(void *data); static Ecore_Animator *_edje_animator = NULL; static Eina_List *_edje_anim_list = NULL; -static int +static Eina_Bool _edje_var_timer_cb(void *data) { Edje_Var_Timer *et; @@ -20,7 +20,7 @@ _edje_var_timer_cb(void *data) Embryo_Function fn; et = data; - if (!et) return 0; + if (!et) return ECORE_CALLBACK_CANCEL; ed = et->edje; // _edje_embryo_script_reset(ed); embryo_program_vm_push(ed->collection->script); @@ -40,10 +40,10 @@ _edje_var_timer_cb(void *data) embryo_program_vm_pop(ed->collection->script); _edje_recalc(ed); } - return 0; + return ECORE_CALLBACK_CANCEL; } -static int +static Eina_Bool _edje_var_anim_cb(void *data __UNUSED__) { Eina_List *l, *tl = NULL;