From dab3a2dac16cc3769a41f502911208b39a6e8760 Mon Sep 17 00:00:00 2001 From: devilhorns Date: Thu, 19 Aug 2010 14:57:23 +0000 Subject: [PATCH] Add UNUSED where needed. Cleanup some formatting. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/edje@51398 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/edje_entry.c | 10 ++++------ src/lib/edje_external.c | 20 ++++++++------------ src/lib/edje_lua2.c | 9 +++++---- 3 files changed, 17 insertions(+), 22 deletions(-) diff --git a/src/lib/edje_entry.c b/src/lib/edje_entry.c index 23ffb14..16ae0ec 100644 --- a/src/lib/edje_entry.c +++ b/src/lib/edje_entry.c @@ -921,22 +921,20 @@ _anchors_get(Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en) static void -_range_del(Evas_Textblock_Cursor *c __UNUSED__, Evas_Object *o, Entry *en) +_range_del(Evas_Textblock_Cursor *c __UNUSED__, Evas_Object *o __UNUSED__, Entry *en) { evas_textblock_cursor_range_delete(en->sel_start, en->sel_end); } static void -_backspace(Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en) +_backspace(Evas_Textblock_Cursor *c, Evas_Object *o __UNUSED__, Entry *en __UNUSED__) { if (evas_textblock_cursor_char_prev(c)) - { - evas_textblock_cursor_char_delete(c); - } + evas_textblock_cursor_char_delete(c); } static void -_delete(Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en) +_delete(Evas_Textblock_Cursor *c, Evas_Object *o __UNUSED__, Entry *en __UNUSED__) { evas_textblock_cursor_char_delete(c); } diff --git a/src/lib/edje_external.c b/src/lib/edje_external.c index 0da90b3..bf60d24 100644 --- a/src/lib/edje_external.c +++ b/src/lib/edje_external.c @@ -655,38 +655,34 @@ _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_Common *chosen_desc) +_edje_external_recalc_apply(Edje *ed __UNUSED__, Edje_Real_Part *ep, + Edje_Calc_Params *params __UNUSED__, + Edje_Part_Description_Common *chosen_desc __UNUSED__) { Edje_External_Type *type; Edje_Part_Description_External *ext; void *params1, *params2 = NULL; - if (!ep->swallowed_object) return; + if (!ep->swallowed_object) return; type = evas_object_data_get(ep->swallowed_object, "Edje_External_Type"); - if (!type) return; - - if (!type->state_set) return; + if ((!type) || (!type->state_set)) return; ext = (Edje_Part_Description_External*) ep->param1.description; params1 = ep->param1.external_params ? - ep->param1.external_params : - ext->external_params; + ep->param1.external_params : ext->external_params; if (ep->param2 && ep->param2->description) { ext = (Edje_Part_Description_External*) ep->param2->description; params2 = ep->param2->external_params ? - ep->param2->external_params : - ext->external_params; + ep->param2->external_params : ext->external_params; } type->state_set(type->data, ep->swallowed_object, - params1, params2, ep->description_pos); + params1, params2, ep->description_pos); } void * diff --git a/src/lib/edje_lua2.c b/src/lib/edje_lua2.c index 5d0d80f..3db6a59 100644 --- a/src/lib/edje_lua2.c +++ b/src/lib/edje_lua2.c @@ -451,7 +451,7 @@ _elua_alloc(void *ud, void *ptr, size_t osize, size_t nsize) } static int -_elua_custom_panic(lua_State *L) +_elua_custom_panic(lua_State *L __UNUSED__) { ERR("Lua Panic!!!!"); return 1; @@ -615,7 +615,7 @@ _elua_obj_new(lua_State *L, Edje *ed, int size) } static void -_elua_obj_free(lua_State *L, Edje_Lua_Obj *obj) +_elua_obj_free(lua_State *L __UNUSED__, Edje_Lua_Obj *obj) { if (!obj->free_func) return; obj->free_func(obj); @@ -2037,15 +2037,16 @@ _edje_lua2_script_shutdown(Edje *ed) } void -_edje_lua2_script_load(Edje_Part_Collection *edc, void *data, int size) +_edje_lua2_script_load(Edje_Part_Collection *edc __UNUSED__, void *data __UNUSED__, int size __UNUSED__) { _elua_init(); } void -_edje_lua2_script_unload(Edje_Part_Collection *edc) +_edje_lua2_script_unload(Edje_Part_Collection *edc __UNUSED__) { lua_State *L; + if (!lstate) return; L = lstate; lua_gc(L, LUA_GCCOLLECT, 0); -- 2.7.4