diff --git a/gio/tests/socket.c b/gio/tests/socket.c index 7408ebe71..5d3278e0f 100644 --- a/gio/tests/socket.c +++ b/gio/tests/socket.c @@ -837,7 +837,7 @@ cancellable_thread_cb (gpointer data) { GCancellable *cancellable = data; - g_usleep (0.1 * G_USEC_PER_SEC); + g_usleep ((guint64) (0.1 * G_USEC_PER_SEC)); g_cancellable_cancel (cancellable); g_object_unref (cancellable); diff --git a/glib/tests/testing.c b/glib/tests/testing.c index 8a49e69aa..0b6633700 100644 --- a/glib/tests/testing.c +++ b/glib/tests/testing.c @@ -330,7 +330,7 @@ static void test_fork_timeout (void) { /* allow child to run for only a fraction of a second */ - if (g_test_trap_fork (0.11 * 1000000, G_TEST_TRAP_DEFAULT)) + if (g_test_trap_fork ((guint64) (0.11 * G_USEC_PER_SEC), G_TEST_TRAP_DEFAULT)) { /* loop and sleep forever */ while (TRUE) @@ -399,7 +399,7 @@ test_subprocess_timeout (void) return; } /* allow child to run for only a fraction of a second */ - g_test_trap_subprocess (NULL, 0.05 * G_USEC_PER_SEC, G_TEST_SUBPROCESS_DEFAULT); + g_test_trap_subprocess (NULL, (guint64) (0.05 * G_USEC_PER_SEC), G_TEST_SUBPROCESS_DEFAULT); g_test_trap_assert_failed (); g_assert_true (g_test_trap_reached_timeout ()); }