]> Pileus Git - ~andy/gtk/commitdiff
c99ism: declaration in the mid of a block
authorHans Breuer <hans@breuer.org>
Sun, 2 Jan 2011 11:36:16 +0000 (12:36 +0100)
committerHans Breuer <hans@breuer.org>
Sun, 2 Jan 2011 12:33:13 +0000 (13:33 +0100)
tests/testcairo.c

index f66d2d626601e99cbdce306d597016d700ecc72f..eaca7a83b7fc1d67de35ebf2b0a56cbe9204f3dc 100644 (file)
@@ -121,11 +121,10 @@ on_draw (GtkWidget *widget,
 {
   cairo_surface_t *overlay, *punch, *circles;
   cairo_t *overlay_cr, *punch_cr, *circles_cr;
-  int width, height;
 
   /* Fill the background */
-  width = gtk_widget_get_allocated_width (widget);
-  height = gtk_widget_get_allocated_height (widget);
+  int width = gtk_widget_get_allocated_width (widget);
+  int height = gtk_widget_get_allocated_height (widget);
   double radius = 0.5 * (width < height ? width : height) - 10;
   double xc = width / 2.;
   double yc = height / 2.;