From: Tom Hacohen Date: Thu, 26 Sep 2013 15:57:37 +0000 (+0100) Subject: Evas image: Moved a variable decl into the ifdef. X-Git-Tag: submit/devel/efl/20131029.075644~197 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=933998b93da3967e07729061eee3cb79852dd864;p=platform%2Fupstream%2Fefl.git Evas image: Moved a variable decl into the ifdef. This variable is only ever used in the ifdef so there it should reside. --- diff --git a/src/lib/evas/common/evas_image_main.c b/src/lib/evas/common/evas_image_main.c index 82f3d8a..6ab9eb4 100644 --- a/src/lib/evas/common/evas_image_main.c +++ b/src/lib/evas/common/evas_image_main.c @@ -439,15 +439,12 @@ static int _evas_common_rgba_image_surface_alloc(Image_Entry *ie, unsigned int w, unsigned int h) { RGBA_Image *im = (RGBA_Image *) ie; - size_t siz = 0; #ifdef EVAS_CSERVE2 if (ie->data1) return 0; #endif if (im->image.no_free) return 0; - siz = _evas_common_rgba_image_surface_size(w, h, (im->flags & RGBA_IMAGE_ALPHA_ONLY)); - if (im->image.data) { _evas_common_rgba_image_surface_munmap(im->image.data, @@ -465,6 +462,8 @@ _evas_common_rgba_image_surface_alloc(Image_Entry *ie, unsigned int w, unsigned surfs = eina_list_append(surfs, ie); #endif #ifdef HAVE_VALGRIND + size_t siz = 0; + siz = _evas_common_rgba_image_surface_size(w, h, (im->flags & RGBA_IMAGE_ALPHA_ONLY)); # ifdef VALGRIND_MAKE_READABLE VALGRIND_MAKE_READABLE(im->image.data, siz); # else