tree-wide: cast after g_object_ref() for proposed GLib patch

This fixes the build with related bug https://bugzilla.gnome.org/show_bug.cgi?id=790697

https://mail.gnome.org/archives/networkmanager-list/2017-December/msg00005.html
This commit is contained in:
Colin Walters
2017-12-05 10:44:12 -05:00
committed by Thomas Haller
parent b0de9cd209
commit 3f6bef47f3
3 changed files with 5 additions and 5 deletions

View File

@@ -479,7 +479,7 @@ updated_get_settings_cb (DBusGProxy *proxy,
} else { } else {
gs_unref_object NMConnection *self_alive = NULL; gs_unref_object NMConnection *self_alive = NULL;
self_alive = g_object_ref (self); self_alive = (NMConnection*)g_object_ref (self);
_nm_connection_replace_settings (NM_CONNECTION (self), new_settings); _nm_connection_replace_settings (NM_CONNECTION (self), new_settings);
g_signal_emit (self, signals[UPDATED], 0, new_settings); g_signal_emit (self, signals[UPDATED], 0, new_settings);
g_hash_table_destroy (new_settings); g_hash_table_destroy (new_settings);
@@ -611,7 +611,7 @@ init_sync (GInitable *initable, GCancellable *cancellable, GError **error)
G_TYPE_INVALID)) G_TYPE_INVALID))
return FALSE; return FALSE;
priv->visible = TRUE; priv->visible = TRUE;
self_alive = g_object_ref (initable); self_alive = (NMConnection*)g_object_ref (initable);
_nm_connection_replace_settings (NM_CONNECTION (initable), hash); _nm_connection_replace_settings (NM_CONNECTION (initable), hash);
g_signal_emit (initable, signals[UPDATED], 0, hash); g_signal_emit (initable, signals[UPDATED], 0, hash);
g_hash_table_destroy (hash); g_hash_table_destroy (hash);
@@ -687,7 +687,7 @@ init_get_settings_cb (DBusGProxy *proxy,
} }
priv->visible = TRUE; priv->visible = TRUE;
self_alive = g_object_ref (init_data->connection); self_alive = (NMConnection*)g_object_ref (init_data->connection);
_nm_connection_replace_settings (NM_CONNECTION (init_data->connection), settings); _nm_connection_replace_settings (NM_CONNECTION (init_data->connection), settings);
g_signal_emit (init_data->connection, signals[UPDATED], 0, settings); g_signal_emit (init_data->connection, signals[UPDATED], 0, settings);
g_hash_table_destroy (settings); g_hash_table_destroy (settings);

View File

@@ -202,5 +202,5 @@ settings_plugin_interface_init (NMSettingsPluginInterface *plugin_iface)
G_MODULE_EXPORT GObject * G_MODULE_EXPORT GObject *
nm_settings_plugin_factory (void) nm_settings_plugin_factory (void)
{ {
return g_object_ref (nms_ibft_plugin_get ()); return (GObject*)g_object_ref (nms_ibft_plugin_get ());
} }

View File

@@ -1080,5 +1080,5 @@ settings_plugin_interface_init (NMSettingsPluginInterface *plugin_iface)
G_MODULE_EXPORT GObject * G_MODULE_EXPORT GObject *
nm_settings_plugin_factory (void) nm_settings_plugin_factory (void)
{ {
return g_object_ref (settings_plugin_ifcfg_get ()); return (GObject*)g_object_ref (settings_plugin_ifcfg_get ());
} }