cookbook: Make example code C90 compliant

Modified all cookbook example code to prevent ISO C90 compliance
warnings occurring during compilation.
This commit is contained in:
Elliot Smith
2010-11-12 09:32:04 +00:00
parent 03a713e18e
commit f9d2310b72
16 changed files with 113 additions and 89 deletions

View File

@ -11,6 +11,8 @@ main (int argc, char *argv[])
ClutterActor *box;
ClutterActor *rect1, *rect2;
guint align_x, align_y, diff_x, diff_y;
ClutterColor *color;
ClutterActor *rect;
clutter_init (&argc, &argv);
@ -54,11 +56,11 @@ main (int argc, char *argv[])
else if (align_y == 4)
diff_y = 2;
ClutterColor *color = clutter_color_new (255 - diff_x * 50,
color = clutter_color_new (255 - diff_x * 50,
100 + diff_y * 50,
0,
255);
ClutterActor *rect = clutter_rectangle_new_with_color (color);
rect = clutter_rectangle_new_with_color (color);
clutter_actor_set_size (rect, 100, 100);
clutter_bin_layout_set_alignment (CLUTTER_BIN_LAYOUT (layout),
rect,