[gnome-builder/gnome-builder-3-26] backport fixes for object assignment type safety



commit 98b77f44b1a86c204a55409b88ea78df652996b2
Author: Christian Hergert <chergert redhat com>
Date:   Thu Jan 18 16:18:04 2018 -0800

    backport fixes for object assignment type safety

 plugins/flatpak/gbp-flatpak-application-addin.c | 2 +-
 plugins/terminal/gb-terminal-view-actions.c     | 2 +-
 plugins/xml-pack/ide-xml-completion-provider.c  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/plugins/flatpak/gbp-flatpak-application-addin.c b/plugins/flatpak/gbp-flatpak-application-addin.c
index 014b93487..172318652 100644
--- a/plugins/flatpak/gbp-flatpak-application-addin.c
+++ b/plugins/flatpak/gbp-flatpak-application-addin.c
@@ -1232,7 +1232,7 @@ gbp_flatpak_application_addin_find_ref (GbpFlatpakApplicationAddin *self,
               if (g_strcmp0 (id, flatpak_ref_get_name (ref)) == 0 &&
                   g_strcmp0 (arch, flatpak_ref_get_arch (ref)) == 0 &&
                   g_strcmp0 (branch, flatpak_ref_get_branch (ref)) == 0)
-                return g_object_ref (ref);
+                return g_object_ref (FLATPAK_INSTALLED_REF (ref));
             }
         }
     }
diff --git a/plugins/terminal/gb-terminal-view-actions.c b/plugins/terminal/gb-terminal-view-actions.c
index 2911f8c02..4f01aa9e2 100644
--- a/plugins/terminal/gb-terminal-view-actions.c
+++ b/plugins/terminal/gb-terminal-view-actions.c
@@ -128,7 +128,7 @@ gb_terminal_view_actions_save_async (GbTerminalView       *view,
     {
       savetask = g_slice_new0 (SaveTask);
       savetask->file = g_object_ref (file);
-      savetask->stream = g_object_ref (output_stream);
+      savetask->stream = g_object_ref (G_OUTPUT_STREAM (output_stream));
       savetask->terminal = g_object_ref (terminal);
 
       g_task_set_task_data (task, savetask, savetask_free);
diff --git a/plugins/xml-pack/ide-xml-completion-provider.c b/plugins/xml-pack/ide-xml-completion-provider.c
index 3a03455f7..b4f80c82d 100644
--- a/plugins/xml-pack/ide-xml-completion-provider.c
+++ b/plugins/xml-pack/ide-xml-completion-provider.c
@@ -1040,7 +1040,7 @@ ide_xml_completion_provider_populate (GtkSourceCompletionProvider *self,
 
   buffer = IDE_BUFFER (gtk_text_iter_get_buffer (&iter));
 
-  state->self = g_object_ref (self);
+  state->self = g_object_ref (IDE_XML_COMPLETION_PROVIDER (self));
   state->completion_context = completion_context;
   state->cancellable = g_cancellable_new ();
   state->buffer = g_object_ref (buffer);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]