From 3888cd5acdd6bd452404d234ed20fc93fc9d8cb3 Mon Sep 17 00:00:00 2001 From: cedric Date: Wed, 7 Oct 2009 11:36:23 +0000 Subject: [PATCH] * edje: Another round of llvm warning removal. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/edje@42932 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/edje_edit.c | 2 +- src/lib/edje_util.c | 47 ++++++++++++++++++++++++----------------------- 2 files changed, 25 insertions(+), 24 deletions(-) diff --git a/src/lib/edje_edit.c b/src/lib/edje_edit.c index 289b024..b0b1261 100644 --- a/src/lib/edje_edit.c +++ b/src/lib/edje_edit.c @@ -5378,7 +5378,7 @@ _edje_generate_source(Evas_Object *obj) strcpy(tmpn, "/tmp/edje_edit.edc-tmp-XXXXXX"); if (!(fd = mkstemp(tmpn))) return NULL; printf("*** tmp file: %s\n", tmpn); - if (!(f = fopen(tmpn, "w"))) return NULL; + if (!(f = fdopen(fd, "w"))) return NULL; /* Write edc into file */ //TODO Probably we need to save the file before generation diff --git a/src/lib/edje_util.c b/src/lib/edje_util.c index e260566..89c9e3b 100644 --- a/src/lib/edje_util.c +++ b/src/lib/edje_util.c @@ -2369,33 +2369,34 @@ edje_object_size_min_restricted_calc(Evas_Object *obj, Evas_Coord *minw, Evas_Co w = ep->w - ep->req.w; h = ep->h - ep->req.h; didw = 0; - if (!((ep->chosen_description) && - (ep->chosen_description->fixed.w))) + if (ep->chosen_description) { - if (w > maxw) + if (!ep->chosen_description->fixed.w) { - maxw = w; - ok = 1; - pep = ep; - didw = 1; - } - if ((ep->part->type == EDJE_PART_TYPE_TEXTBLOCK)) - { - /* FIXME: do something */ - } - } - if (!((ep->chosen_description) && - (ep->chosen_description->fixed.h))) - { - if (!((ep->part->type == EDJE_PART_TYPE_TEXTBLOCK) && - (!ep->chosen_description->text.min_x) && - (didw))) - { - if (h > maxh) + if (w > maxw) { - maxh = h; + maxw = w; ok = 1; pep = ep; + didw = 1; + } + if ((ep->part->type == EDJE_PART_TYPE_TEXTBLOCK)) + { + /* FIXME: do something */ + } + } + if (!ep->chosen_description->fixed.h) + { + if (!((ep->part->type == EDJE_PART_TYPE_TEXTBLOCK) && + (!ep->chosen_description->text.min_x) && + (didw))) + { + if (h > maxh) + { + maxh = h; + ok = 1; + pep = ep; + } } } } @@ -2472,7 +2473,7 @@ edje_object_part_state_get(const Evas_Object *obj, const char *part, double *val printf("part not found\n"); return ""; } - if (!rp->chosen_description) + if (rp->chosen_description) { if (val_ret) *val_ret = rp->chosen_description->state.value; if (rp->chosen_description->state.name) -- 2.7.4