Fix compiler warnings

This commit is contained in:
Dan Winship
2011-05-02 11:45:52 -04:00
parent 6f711a76cd
commit bdc23c44e8
14 changed files with 42 additions and 45 deletions

View File

@@ -198,6 +198,8 @@ test_multithreaded_dynamic_type_init (void)
guint i;
module = test_module_new (module_register);
g_assert (module != NULL);
/* Not loaded until we call ref for the first time */
class = g_type_class_peek (DYNAMIC_OBJECT_TYPE);
g_assert (class == NULL);
@@ -339,6 +341,7 @@ test_dynamic_interface_properties (void)
DynObj *obj;
module = test_module_new (mod_register);
g_assert (module != NULL);
obj = g_object_new (dyn_obj_get_type (), "foo", 1, NULL);

View File

@@ -107,13 +107,12 @@ tester_init_thread (gpointer data)
static void
test_threaded_class_init (void)
{
GThread *threads[3] = { NULL, };
/* pause newly created threads */
g_mutex_lock (sync_mutex);
/* create threads */
threads[0] = g_thread_create (tester_init_thread, (gpointer) my_tester0_get_type(), TRUE, NULL);
threads[1] = g_thread_create (tester_init_thread, (gpointer) my_tester1_get_type(), TRUE, NULL);
threads[2] = g_thread_create (tester_init_thread, (gpointer) my_tester2_get_type(), TRUE, NULL);
g_thread_create (tester_init_thread, (gpointer) my_tester0_get_type(), TRUE, NULL);
g_thread_create (tester_init_thread, (gpointer) my_tester1_get_type(), TRUE, NULL);
g_thread_create (tester_init_thread, (gpointer) my_tester2_get_type(), TRUE, NULL);
/* execute threads */
g_mutex_unlock (sync_mutex);
while (g_atomic_int_get (&mtsafe_call_counter) < (3 + 3 + 3 * 3) * NUM_COUNTER_INCREMENTS)