[balsa/wip/gtk4: 85/351] Cast g_object_ref() arguments
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/wip/gtk4: 85/351] Cast g_object_ref() arguments
- Date: Wed, 23 May 2018 21:24:05 +0000 (UTC)
commit cf6486ba20307072864aa4ef7ab6098ba15ec7eb
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Fri Dec 8 16:17:01 2017 -0500
Cast g_object_ref() arguments
In glib-2.56, g_object_ref() propagates the type from its argument
to its return type, which can raise incompatible-pointer-type
warnings; previously it returned a gpointer, which could conceal
a coding error.
* libbalsa/send.c (send_message_info_new): do not cast arguments
to GObject.
* src/main-window.c (balsa_window_setup_progress): cast argument
window->progress_bar to GtkProgressBar.
ChangeLog | 12 ++++++++++++
libbalsa/send.c | 4 ++--
src/main-window.c | 2 +-
3 files changed, 15 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 047d2dd..df65779 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2017-12-08 Peter Bloomfield <pbloomfield bellsouth net>
+
+ In glib-2.56, g_object_ref() propagates the type from its argument
+ to its return type, which can raise incompatible-pointer-type
+ warnings; previously it returned a gpointer, which could conceal
+ a coding error.
+
+ * libbalsa/send.c (send_message_info_new): do not cast arguments
+ to GObject.
+ * src/main-window.c (balsa_window_setup_progress): cast argument
+ window->progress_bar to GtkProgressBar.
+
2017-12-03 Peter Bloomfield <pbloomfield bellsouth net>
Remove a webkitgtk workaround
diff --git a/libbalsa/send.c b/libbalsa/send.c
index 5991bf4..892cd16 100644
--- a/libbalsa/send.c
+++ b/libbalsa/send.c
@@ -205,9 +205,9 @@ send_message_info_new(LibBalsaSmtpServer *smtp_server,
smi = g_new0(SendMessageInfo, 1);
smi->session = session;
- smi->outbox = g_object_ref(G_OBJECT(outbox));
+ smi->outbox = g_object_ref(outbox);
smi->finder = finder;
- smi->smtp_server = g_object_ref(G_OBJECT(smtp_server));
+ smi->smtp_server = g_object_ref(smtp_server);
smi->progress_id = g_strdup_printf(_("SMTP server %s"), libbalsa_smtp_server_get_name(smtp_server));
return smi;
}
diff --git a/src/main-window.c b/src/main-window.c
index 291d8cb..476c67a 100644
--- a/src/main-window.c
+++ b/src/main-window.c
@@ -4743,7 +4743,7 @@ balsa_window_setup_progress(BalsaWindow * window, const gchar * text)
/* Update the display in an idle callback, in case we were called in
* a sub-thread.*/
info = g_new(BalsaWindowSetupProgressInfo, 1);
- info->progress_bar = g_object_ref(window->progress_bar);
+ info->progress_bar = g_object_ref(GTK_PROGRESS_BAR(window->progress_bar));
info->text = g_strdup(text);
g_idle_add((GSourceFunc) bw_setup_progress_idle_cb, info);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]