diff --git a/gio/gsocket.c b/gio/gsocket.c index 3411b7785..a4b57d909 100644 --- a/gio/gsocket.c +++ b/gio/gsocket.c @@ -4003,8 +4003,6 @@ socket_source_prepare (GSource *source, { GSocketSource *socket_source = (GSocketSource *)source; - *timeout = -1; - #ifdef G_OS_WIN32 if ((socket_source->pollfd.revents & G_IO_NVAL) != 0) return TRUE; diff --git a/glib/giounix.c b/glib/giounix.c index 9d9492b28..84e81357c 100644 --- a/glib/giounix.c +++ b/glib/giounix.c @@ -135,8 +135,6 @@ g_io_unix_prepare (GSource *source, GIOUnixWatch *watch = (GIOUnixWatch *)source; GIOCondition buffer_condition = g_io_channel_get_buffer_condition (watch->channel); - *timeout = -1; - /* Only return TRUE here if _all_ bits in watch->condition will be set */ return ((watch->condition & buffer_condition) == watch->condition); diff --git a/glib/giowin32.c b/glib/giowin32.c index b9b481921..f0e025d4a 100644 --- a/glib/giowin32.c +++ b/glib/giowin32.c @@ -709,8 +709,6 @@ g_io_win32_prepare (GSource *source, GIOWin32Channel *channel = (GIOWin32Channel *)watch->channel; int event_mask; - *timeout = -1; - if (channel->debug) g_print ("g_io_win32_prepare: source=%p channel=%p", source, channel); diff --git a/glib/gmain.c b/glib/gmain.c index ee6a699f3..5fb2746f8 100644 --- a/glib/gmain.c +++ b/glib/gmain.c @@ -5510,7 +5510,6 @@ g_child_watch_prepare (GSource *source, gint *timeout) { #ifdef G_OS_WIN32 - *timeout = -1; return FALSE; #else /* G_OS_WIN32 */ { diff --git a/glib/tests/mainloop.c b/glib/tests/mainloop.c index 5c34cf4ae..152e74b87 100644 --- a/glib/tests/mainloop.c +++ b/glib/tests/mainloop.c @@ -37,6 +37,8 @@ cb (gpointer data) static gboolean prepare (GSource *source, gint *time) { + g_assert_nonnull (time); + g_assert_cmpint (*time, ==, -1); return FALSE; } static gboolean