Evas image: Moved a variable decl into the ifdef.
authorTom Hacohen <tom@stosb.com>
Thu, 26 Sep 2013 15:57:37 +0000 (16:57 +0100)
committerTom Hacohen <tom@stosb.com>
Thu, 26 Sep 2013 15:57:37 +0000 (16:57 +0100)
This variable is only ever used in the ifdef so there it should
reside.

src/lib/evas/common/evas_image_main.c

index 82f3d8a..6ab9eb4 100644 (file)
@@ -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