[Xfce4-commits] [apps/xfce4-screensaver] 217/425: fix warnings due to wrong id passed to g_source_remove

noreply at xfce.org noreply at xfce.org
Mon Oct 15 01:51:04 CEST 2018


This is an automated email from the git hooks/post-receive script.

b   l   u   e   s   a   b   r   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository apps/xfce4-screensaver.

commit 8b30ebf59492dca891a847b1ba4cf23edb693266
Author: monsta <monsta at inbox.ru>
Date:   Thu Nov 12 12:02:14 2015 +0300

    fix warnings due to wrong id passed to g_source_remove
---
 savers/floaters.c       | 8 ++++++--
 savers/gste-slideshow.c | 1 +
 src/gs-auth-pam.c       | 1 +
 src/gs-watcher-x11.c    | 2 ++
 src/gs-window-x11.c     | 1 +
 5 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/savers/floaters.c b/savers/floaters.c
index c2f4bc4..9eb7897 100644
--- a/savers/floaters.c
+++ b/savers/floaters.c
@@ -910,11 +910,15 @@ screen_saver_free (ScreenSaver *screen_saver)
 
 	g_hash_table_destroy (screen_saver->cached_sources);
 
-	if (screen_saver->state_update_timeout_id != 0)
+	if (screen_saver->state_update_timeout_id != 0) {
 		g_source_remove (screen_saver->state_update_timeout_id);
+		screen_saver->state_update_timeout_id = 0;
+	}
 
-	if (screen_saver->stats_update_timeout_id != 0)
+	if (screen_saver->stats_update_timeout_id != 0) {
 		g_source_remove (screen_saver->stats_update_timeout_id);
+		screen_saver->stats_update_timeout_id = 0;
+	}
 
 	screen_saver_destroy_floaters (screen_saver);
 
diff --git a/savers/gste-slideshow.c b/savers/gste-slideshow.c
index d515b0b..887ec87 100644
--- a/savers/gste-slideshow.c
+++ b/savers/gste-slideshow.c
@@ -1072,6 +1072,7 @@ gste_slideshow_finalize (GObject *object)
 	if (show->priv->results_pull_id > 0)
 	{
 		g_source_remove (show->priv->results_pull_id);
+		show->priv->results_pull_id = 0;
 	}
 
 	if (show->priv->results_q != NULL)
diff --git a/src/gs-auth-pam.c b/src/gs-auth-pam.c
index f150277..3ca3e42 100644
--- a/src/gs-auth-pam.c
+++ b/src/gs-auth-pam.c
@@ -694,6 +694,7 @@ out:
 	if (watch_id != 0)
 	{
 		g_source_remove (watch_id);
+		watch_id = 0;
 	}
 
 	if (channel != NULL)
diff --git a/src/gs-watcher-x11.c b/src/gs-watcher-x11.c
index 7b5b5c5..d740cfa 100644
--- a/src/gs-watcher-x11.c
+++ b/src/gs-watcher-x11.c
@@ -392,6 +392,7 @@ set_status (GSWatcher *watcher,
 		if (watcher->priv->idle_id > 0)
 		{
 			g_source_remove (watcher->priv->idle_id);
+			watcher->priv->idle_id = 0;
 		}
 		res = _gs_watcher_set_session_idle (watcher, FALSE);
 		res = _gs_watcher_set_session_idle_notice (watcher, FALSE);
@@ -566,6 +567,7 @@ gs_watcher_finalize (GObject *object)
 	if (watcher->priv->idle_id > 0)
 	{
 		g_source_remove (watcher->priv->idle_id);
+		watcher->priv->idle_id = 0;
 	}
 
 	watcher->priv->active = FALSE;
diff --git a/src/gs-window-x11.c b/src/gs-window-x11.c
index 254a9b5..b1b8ba6 100644
--- a/src/gs-window-x11.c
+++ b/src/gs-window-x11.c
@@ -2784,6 +2784,7 @@ gs_window_finalize (GObject *object)
 	if (window->priv->info_bar_timer_id > 0)
 	{
 		g_source_remove (window->priv->info_bar_timer_id);
+		window->priv->info_bar_timer_id = 0;
 	}
 
 	remove_watchdog_timer (window);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list