[gegl] cl: fixing compiler warnings



commit 388ee7426a571080ea5746cce46e90f2a34caf9f
Author: Victor Oliveira <victormatheus gmail com>
Date:   Sun Apr 1 14:20:32 2012 -0300

    cl: fixing compiler warnings

 gegl/opencl/gegl-cl-init.c       |    2 +-
 operations/common/write-buffer.c |    9 +++++----
 2 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/gegl/opencl/gegl-cl-init.c b/gegl/opencl/gegl-cl-init.c
index fb6f7a1..ade7d5c 100644
--- a/gegl/opencl/gegl-cl-init.c
+++ b/gegl/opencl/gegl-cl-init.c
@@ -278,7 +278,7 @@ gegl_cl_init (GError **error)
         }
       cl_state.iter_width  /= 2;
 
-      GEGL_NOTE (GEGL_DEBUG_OPENCL, "Iteration size: (%d, %d)", cl_state.iter_width, cl_state.iter_height);
+      GEGL_NOTE (GEGL_DEBUG_OPENCL, "Iteration size: (%lu, %lu)", cl_state.iter_width, cl_state.iter_height);
 
       if (cl_state.image_support)
         {
diff --git a/operations/common/write-buffer.c b/operations/common/write-buffer.c
index d926ad3..89a5ade 100644
--- a/operations/common/write-buffer.c
+++ b/operations/common/write-buffer.c
@@ -51,18 +51,19 @@ process (GeglOperation       *operation,
       if (gegl_cl_is_accelerated ()
           && gegl_cl_color_supported (input->soft_format, output->soft_format) == GEGL_CL_COLOR_CONVERT)
         {
-          GEGL_NOTE (GEGL_DEBUG_OPENCL, "write-buffer: %p %p %s %s {%d %d %d %d}", input, output, babl_get_name(input->soft_format), babl_get_name(output->soft_format),
-                                                                                   result->x, result->y, result->width, result->height);
-
           size_t size;
           gboolean err;
           cl_int cl_err;
           gint j;
-          gegl_cl_color_babl (output->soft_format, &size);
 
           GeglBufferClIterator *i = gegl_buffer_cl_iterator_new (output,   result, output->soft_format, GEGL_CL_BUFFER_WRITE, GEGL_ABYSS_NONE);
                         gint read = gegl_buffer_cl_iterator_add (i, input, result, output->soft_format, GEGL_CL_BUFFER_READ,  GEGL_ABYSS_NONE);
 
+          gegl_cl_color_babl (output->soft_format, &size);
+
+          GEGL_NOTE (GEGL_DEBUG_OPENCL, "write-buffer: %p %p %s %s {%d %d %d %d}", input, output, babl_get_name(input->soft_format), babl_get_name(output->soft_format),
+                                                                                   result->x, result->y, result->width, result->height);
+
           while (gegl_buffer_cl_iterator_next (i, &err))
             {
               if (err) break;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]