Enlightenment CVS committal Author : englebass Project : e17 Module : libs/edje
Dir : e17/libs/edje/src/lib Modified Files: edje_edit.c edje_private.h Log Message: Fix compiler warnings =================================================================== RCS file: /cvs/e/e17/libs/edje/src/lib/edje_edit.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -3 -r1.8 -r1.9 --- edje_edit.c 12 Mar 2008 16:32:35 -0000 1.8 +++ edje_edit.c 13 Mar 2008 16:01:35 -0000 1.9 @@ -222,7 +222,7 @@ if (rp->custom.description) { - _edje_collection_free_part_description_free(rp->custom.description); + _edje_collection_free_part_description_free(rp->custom.description, 0); } _edje_unref(rp->edje); @@ -399,10 +399,12 @@ pt = ll->data; if (pt->id == old_id) - if (new_id == -1) - epr->targets = evas_list_remove(epr->targets, pt); - else - pt->id = new_id; + { + if (new_id == -1) + epr->targets = evas_list_remove(epr->targets, pt); + else + pt->id = new_id; + } } } @@ -753,8 +755,7 @@ edje_edit_group_name_set(Evas_Object *obj, const char *new_name) { Evas_List *l; - int id; - + GET_ED_OR_RETURN(0) if (!new_name) return 0; if (edje_edit_group_exist(obj, new_name)) return 0; @@ -784,10 +785,11 @@ // evas_stringshare_del(pce->entry); pce->entry = evas_stringshare_add(new_name); - return; + return 1; } l = l->next; } + return 0; } EAPI int @@ -1025,11 +1027,10 @@ edje_edit_part_del(Evas_Object *obj, const char* part) { printf("REMOVE PART: %s\n", part); - Evas_List *l, *ll; Edje_Part *ep; int id; - GET_RP_OR_RETURN() + GET_RP_OR_RETURN(0) ep = rp->part; id = ep->id; @@ -1082,7 +1083,7 @@ _edje_if_string_free(ed, ep->name); if (ep->default_desc) { - _edje_collection_free_part_description_free(ep->default_desc); + _edje_collection_free_part_description_free(ep->default_desc, 0); ep->default_desc = NULL; } while (ep->other_desc) @@ -1091,7 +1092,7 @@ desc = ep->other_desc->data; ep->other_desc = evas_list_remove(ep->other_desc, desc); - _edje_collection_free_part_description_free(desc); + _edje_collection_free_part_description_free(desc, 0); } free(ep); @@ -1455,7 +1456,7 @@ rp->part->other_desc = evas_list_remove(rp->part->other_desc, pd); - _edje_collection_free_part_description_free(pd); + _edje_collection_free_part_description_free(pd, 0); } EAPI void @@ -2044,7 +2045,7 @@ EAPI unsigned char edje_edit_state_aspect_pref_get(Evas_Object *obj, const char *part, const char *state) { - GET_PD_OR_RETURN() + GET_PD_OR_RETURN(0) printf("GET ASPECT_PREF of state '%s' [%d]\n", state, pd->aspect.prefer); return pd->aspect.prefer; } @@ -2059,10 +2060,10 @@ /* TEXT API */ /**************/ -EAPI const char* +EAPI const char * edje_edit_state_text_get(Evas_Object *obj, const char *part, const char *state) { - GET_PD_OR_RETURN() + GET_PD_OR_RETURN(NULL) //printf("GET TEXT of state: %s\n", state); if (pd->text.text) @@ -2127,7 +2128,7 @@ EAPI double edje_edit_state_text_align_y_get(Evas_Object *obj, const char *part, const char *state) { - GET_PD_OR_RETURN() + GET_PD_OR_RETURN(0.0) //printf("GET TEXT_ALIGN_Y of state: %s [%f]\n", state, pd->text.align.x); return pd->text.align.y; } @@ -2398,7 +2399,7 @@ /* Create Image Entry */ de = mem_alloc(sizeof(Edje_Image_Directory_Entry)); - if (name = strrchr(path, '/')) name++; + if ((name = strrchr(path, '/'))) name++; else name = (char *)path; de->entry = mem_strdup(name); de->id = free_id; @@ -3203,7 +3204,7 @@ script = ed->collection->script; - printf("Get Script [%d] %d\n",script, embryo_program_recursion_get(script)); + printf("Get Script [%p] %d\n", script, embryo_program_recursion_get(script)); return "Not yet complete..."; } @@ -3222,7 +3223,6 @@ long sz; SrcFile *sf; SrcFile_List *sfl; - Eet_File *eetf; /* Open a temp file */ //TODO this will not work on windows @@ -3339,7 +3339,6 @@ EAPI void edje_edit_print_internal_status(Evas_Object *obj) { - int i; Evas_List *l; GET_ED_OR_RETURN() =================================================================== RCS file: /cvs/e/e17/libs/edje/src/lib/edje_private.h,v retrieving revision 1.144 retrieving revision 1.145 diff -u -3 -r1.144 -r1.145 --- edje_private.h 6 Mar 2008 17:52:59 -0000 1.144 +++ edje_private.h 13 Mar 2008 16:01:35 -0000 1.145 @@ -428,8 +428,8 @@ struct _Edje_Part_Collection_Directory_Entry { - char *entry; /* the nominal name of the part collection */ - int id; /* the id of this named part collection */ + const char *entry; /* the nominal name of the part collection */ + int id; /* the id of this named part collection */ }; /*----------*/ @@ -464,7 +464,7 @@ const char *name; /* the name if any of the part */ Edje_Part_Description *default_desc; /* the part descriptor for default */ Evas_List *other_desc; /* other possible descriptors */ - char *source; + const char *source; int id; /* its id number */ int clip_to_id; /* the part id to clip this one to */ struct { @@ -1029,6 +1029,8 @@ void _edje_file_free(Edje_File *edf); void _edje_file_cache_shutdown(void); void _edje_collection_free(Edje_File *edf, Edje_Part_Collection *ec); +void _edje_collection_free_part_description_free(Edje_Part_Description *desc, unsigned int free_strings); + Edje *_edje_add(Evas_Object *obj); void _edje_del(Edje *ed); ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs