[glib] Fix build with gcc-2.*.
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Fix build with gcc-2.*.
- Date: Mon, 23 May 2011 17:27:45 +0000 (UTC)
commit ce0f7cafa1746a94f90b74860c2890b6c18ca385
Author: Antoine Jacoutot <ajacoutot bsdfrog org>
Date: Mon May 23 19:11:10 2011 +0200
Fix build with gcc-2.*.
https://bugzilla.gnome.org/show_bug.cgi?id=650884
gio/tests/gdbus-connection.c | 4 ++--
gio/tests/memory-output-stream.c | 10 ++++++----
2 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/gio/tests/gdbus-connection.c b/gio/tests/gdbus-connection.c
index 5c2939e..a88df90 100644
--- a/gio/tests/gdbus-connection.c
+++ b/gio/tests/gdbus-connection.c
@@ -529,6 +529,8 @@ test_connection_signals (void)
GError *error;
gboolean ret;
GVariant *result;
+ gboolean quit_mainloop_fired;
+ guint quit_mainloop_id;
error = NULL;
@@ -686,8 +688,6 @@ test_connection_signals (void)
* Also to check the total amount of NameOwnerChanged signals - use a 5 second ceiling
* to avoid spinning forever
*/
- gboolean quit_mainloop_fired;
- guint quit_mainloop_id;
quit_mainloop_fired = FALSE;
quit_mainloop_id = g_timeout_add (30000, test_connection_quit_mainloop, &quit_mainloop_fired);
while (count_name_owner_changed < 2 && !quit_mainloop_fired)
diff --git a/gio/tests/memory-output-stream.c b/gio/tests/memory-output-stream.c
index 210ad50..01baaf5 100644
--- a/gio/tests/memory-output-stream.c
+++ b/gio/tests/memory-output-stream.c
@@ -118,6 +118,10 @@ test_properties (void)
GDataOutputStream *o;
int i;
GError *error = NULL;
+ gsize data_size_fun;
+ gsize data_size_prop;
+ gpointer data_fun;
+ gpointer data_prop;
g_test_bug ("605733");
@@ -133,13 +137,11 @@ test_properties (void)
g_assert_no_error (error);
}
- gsize data_size_fun = g_memory_output_stream_get_data_size (G_MEMORY_OUTPUT_STREAM (mo));
- gsize data_size_prop;
+ data_size_fun = g_memory_output_stream_get_data_size (G_MEMORY_OUTPUT_STREAM (mo));
g_object_get (mo, "data-size", &data_size_prop, NULL);
g_assert_cmpint (data_size_fun, ==, data_size_prop);
- gpointer data_fun = g_memory_output_stream_get_data (G_MEMORY_OUTPUT_STREAM (mo));
- gpointer data_prop;
+ data_fun = g_memory_output_stream_get_data (G_MEMORY_OUTPUT_STREAM (mo));
g_object_get (mo, "data", &data_prop, NULL);
g_assert_cmphex (GPOINTER_TO_SIZE (data_fun), ==, GPOINTER_TO_SIZE (data_prop));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]