tests/: Declare variables at the top-of-block
This will ensure that the code will build for pre-C99 compilers.
This commit is contained in:
parent
92206fe23b
commit
0e24d35e3b
@ -99,12 +99,12 @@ main (int argc,
|
|||||||
|
|
||||||
for (j = 0; j < 2; j++)
|
for (j = 0; j < 2; j++)
|
||||||
{
|
{
|
||||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 5);
|
|
||||||
|
|
||||||
char *aligns_names[] = { "FILL", "BASELINE" };
|
char *aligns_names[] = { "FILL", "BASELINE" };
|
||||||
GtkAlign aligns[] = { GTK_ALIGN_FILL, GTK_ALIGN_BASELINE};
|
GtkAlign aligns[] = { GTK_ALIGN_FILL, GTK_ALIGN_BASELINE};
|
||||||
|
|
||||||
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
|
||||||
|
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 5);
|
||||||
|
|
||||||
label = gtk_label_new (aligns_names[j]);
|
label = gtk_label_new (aligns_names[j]);
|
||||||
gtk_container_add (GTK_CONTAINER (hbox), label);
|
gtk_container_add (GTK_CONTAINER (hbox), label);
|
||||||
|
|
||||||
|
@ -56,12 +56,13 @@ prepare_window_for_orientation (GtkOrientation orientation)
|
|||||||
0.0);
|
0.0);
|
||||||
|
|
||||||
GtkWidget *spin = gtk_spin_button_new (adj, 1.0, 0);
|
GtkWidget *spin = gtk_spin_button_new (adj, 1.0, 0);
|
||||||
|
GtkWidget *hbox;
|
||||||
gtk_orientable_set_orientation (GTK_ORIENTABLE (spin), orientation);
|
gtk_orientable_set_orientation (GTK_ORIENTABLE (spin), orientation);
|
||||||
gtk_widget_set_halign (GTK_WIDGET (spin), GTK_ALIGN_CENTER);
|
gtk_widget_set_halign (GTK_WIDGET (spin), GTK_ALIGN_CENTER);
|
||||||
|
|
||||||
g_object_bind_property (wrap_button, "active", spin, "wrap", G_BINDING_SYNC_CREATE);
|
g_object_bind_property (wrap_button, "active", spin, "wrap", G_BINDING_SYNC_CREATE);
|
||||||
|
|
||||||
GtkWidget *hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), spin, FALSE, FALSE, 2);
|
gtk_box_pack_start (GTK_BOX (hbox), spin, FALSE, FALSE, 2);
|
||||||
gtk_container_add (GTK_CONTAINER (mainbox), hbox);
|
gtk_container_add (GTK_CONTAINER (mainbox), hbox);
|
||||||
}
|
}
|
||||||
|
@ -237,11 +237,12 @@ collect_old_frames (void)
|
|||||||
for (l = past_frames; l; l = l_next)
|
for (l = past_frames; l; l = l_next)
|
||||||
{
|
{
|
||||||
FrameData *frame_data = l->data;
|
FrameData *frame_data = l->data;
|
||||||
|
GdkFrameTimings *timings;
|
||||||
gboolean remove = FALSE;
|
gboolean remove = FALSE;
|
||||||
l_next = l->next;
|
l_next = l->next;
|
||||||
|
|
||||||
GdkFrameTimings *timings = gdk_frame_clock_get_timings (frame_clock,
|
timings = gdk_frame_clock_get_timings (frame_clock,
|
||||||
frame_data->frame_counter);
|
frame_data->frame_counter);
|
||||||
if (timings == NULL)
|
if (timings == NULL)
|
||||||
{
|
{
|
||||||
remove = TRUE;
|
remove = TRUE;
|
||||||
|
Loading…
Reference in New Issue
Block a user