From: caro Date: Tue, 14 Dec 2010 06:19:30 +0000 (+0000) Subject: use size_t when it does not hurt X-Git-Tag: 2.0_alpha~163^2~179 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b28267d7ab7ad1b0c25b57418e74d095b3e73aba;p=framework%2Fuifw%2Fedje.git use size_t when it does not hurt git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/edje@55548 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/edje_calc.c b/src/lib/edje_calc.c index 2eed526..c1aa0d0 100644 --- a/src/lib/edje_calc.c +++ b/src/lib/edje_calc.c @@ -847,7 +847,7 @@ _edje_part_recalc_single_text(FLOAT_T sc, { char *font2; - int len = strlen(font) + sizeof("edje/fonts/") + 1; + size_t len = strlen(font) + sizeof("edje/fonts/") + 1; font2 = alloca(len); sprintf(font2, "edje/fonts/%s", font); font = font2; diff --git a/src/lib/edje_entry.c b/src/lib/edje_entry.c index a44c91a..581c72b 100644 --- a/src/lib/edje_entry.c +++ b/src/lib/edje_entry.c @@ -569,7 +569,7 @@ _edje_anchor_mouse_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UN Evas_Event_Mouse_Down *ev = event_info; Edje_Real_Part *rp = an->en->rp; char *buf, *n; - int len; + size_t len; int ignored; Entry *en; @@ -601,7 +601,7 @@ _edje_anchor_mouse_up_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUS Evas_Event_Mouse_Up *ev = event_info; Edje_Real_Part *rp = an->en->rp; char *buf, *n; - int len; + size_t len; int ignored; Entry *en; @@ -628,7 +628,7 @@ _edje_anchor_mouse_move_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UN Evas_Event_Mouse_Move *ev = event_info; Edje_Real_Part *rp = an->en->rp; char *buf, *n; - int len; + size_t len; int ignored; Entry *en; @@ -655,7 +655,7 @@ _edje_anchor_mouse_in_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUS Evas_Event_Mouse_In *ev = event_info; Edje_Real_Part *rp = an->en->rp; char *buf, *n; - int len; + size_t len; int ignored; ignored = rp->part->ignore_flags & ev->event_flags; @@ -677,7 +677,7 @@ _edje_anchor_mouse_out_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNU Evas_Event_Mouse_Out *ev = event_info; Edje_Real_Part *rp = an->en->rp; char *buf, *n; - int len; + size_t len; int ignored; ignored = rp->part->ignore_flags & ev->event_flags; diff --git a/src/lib/edje_load.c b/src/lib/edje_load.c index 5c7c778..a75ed49 100644 --- a/src/lib/edje_load.c +++ b/src/lib/edje_load.c @@ -1440,7 +1440,7 @@ _cb_signal_repeat(void *data, Evas_Object *obj, const char *signal, const char * if (origin > length) { char *tmp; - int alias_length; + size_t alias_length; alias_length = strlen(alias); tmp = alloca(alias_length + origin - length + 2); diff --git a/src/lib/edje_private.h b/src/lib/edje_private.h index b84c99d..4612043 100644 --- a/src/lib/edje_private.h +++ b/src/lib/edje_private.h @@ -1786,7 +1786,7 @@ EAPI void _edje_module_shutdown(); static inline Eina_Bool edje_program_is_strncmp(const char *str) { - unsigned int length; + size_t length; length = strlen(str); diff --git a/src/lib/edje_text.c b/src/lib/edje_text.c index 84cbf64..67a5c5c 100644 --- a/src/lib/edje_text.c +++ b/src/lib/edje_text.c @@ -266,7 +266,7 @@ static const char * _edje_text_font_get(const char *base, const char *new, char **free_later) { const char *base_style, *new_style, *aux; - int font_len, style_len; + size_t font_len, style_len; if (base && (!new)) return base; @@ -283,7 +283,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) : (int) strlen(base_style); + style_len = (aux) ? (aux - base_style) : strlen(base_style); *free_later = malloc(font_len + style_len + 1); memcpy(*free_later, new, font_len); @@ -365,7 +365,7 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep, { char *font2; - int len = strlen(font) + sizeof("edje/fonts/") + 1; + size_t len = strlen(font) + sizeof("edje/fonts/") + 1; font2 = alloca(len); sprintf(font2, "edje/fonts/%s", font); font = font2; diff --git a/src/lib/edje_util.c b/src/lib/edje_util.c index 5088de1..5b85fef 100644 --- a/src/lib/edje_util.c +++ b/src/lib/edje_util.c @@ -2528,7 +2528,7 @@ static Edje_Box_Layout * _edje_box_layout_external_new(const char *name, Evas_Object_Box_Layout func, void *(*layout_data_get)(void *), void (*layout_data_free)(void *), void (*free_data)(void *), void *data) { Edje_Box_Layout *l; - int name_len; + size_t name_len; name_len = strlen(name) + 1; l = malloc(sizeof(Edje_Box_Layout) + name_len);