Patch for rectangle func and GeglRectangle initialization in tests/buffer/buffer-test.c

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

 



1. The void rectangle function in tests/buffer/buffer-test.c should be
   static void to match the prototype.
2. You cannot initialize rect when you declare it in rectangle() unless
   you assume a C99 compiler.

Patch for both issues attached.

-- 
albert chin (china@xxxxxxxxxxxxxxxxxx)
Index: tests/buffer/buffer-test.c
===================================================================
--- tests/buffer/buffer-test.c.orig	2009-11-29 16:20:15.964770878 +0000
+++ tests/buffer/buffer-test.c	2009-11-29 16:28:32.408518645 +0000
@@ -270,15 +270,20 @@
     }
 }
 
-void rectangle (GeglBuffer *buffer,
-                gint        x,
-                gint        y,
-                gint        width,
-                gint        height,
-                gfloat      value)
+static void rectangle (GeglBuffer *buffer,
+                       gint        x,
+                       gint        y,
+                       gint        width,
+                       gint        height,
+                       gfloat      value)
 {
   GeglBuffer *sub_buf;
-  GeglRectangle rect={x,y,width,height};
+  GeglRectangle rect;
+
+  rect.x = x;
+  rect.y = y;
+  rect.width = width;
+  rect.height = height;
 
   sub_buf = gegl_buffer_create_sub_buffer (buffer, &rect);
   fill (sub_buf, value);
_______________________________________________
Gegl-developer mailing list
Gegl-developer@xxxxxxxxxxxxxxxxxxxxxx
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gegl-developer

[Index of Archives]     [Yosemite News]     [Yosemite Photos]     [gtk]     [GIMP Users]     [KDE]     [Gimp's Home]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux