summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRahul Verma <rv404674@gmail.com>2018-01-12 14:25:24 +0530
committerRahul Verma <rv404674@gmail.com>2018-01-14 03:09:17 +0530
commite01a8497e2c68fd078f1c85acbedfd2fb5b1fbd4 (patch)
treeb849d78a97841aa48ce1bafa9dc5311ab75044e7
parentf4d493060c5238a8d66acba1963b9a5a395c64c7 (diff)
downloadnautilus-e01a8497e2c68fd078f1c85acbedfd2fb5b1fbd4.tar.gz
general: Fix-Wincompatible-pointer-types warnings
We were having an issue where we were not casting objects properly. https://blogs.gnome.org/chergert/2018/01/05/g_object_ref-and-wincompatible-pointer-types/ The solution is to type cast explicitly to the correct type. close #192
-rw-r--r--src/nautilus-file.c2
-rw-r--r--src/nautilus-files-view.c4
-rw-r--r--src/nautilus-progress-info-manager.c2
-rw-r--r--src/nautilus-properties-window.c4
4 files changed, 6 insertions, 6 deletions
diff --git a/src/nautilus-file.c b/src/nautilus-file.c
index 6402e87ae..86c963a67 100644
--- a/src/nautilus-file.c
+++ b/src/nautilus-file.c
@@ -5454,7 +5454,7 @@ nautilus_file_get_thumbnail_icon (NautilusFile *file,
if (pixbuf != NULL)
{
- gicon = g_object_ref (pixbuf);
+ gicon = G_ICON (g_object_ref (pixbuf));
}
else if (file->details->is_thumbnailing)
{
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index ab782af76..e74123a7a 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -9492,8 +9492,8 @@ nautilus_files_view_init (NautilusFilesView *view)
builder = gtk_builder_new_from_resource ("/org/gnome/nautilus/ui/nautilus-toolbar-view-menu.ui");
priv->toolbar_menu_sections = g_new0 (NautilusToolbarMenuSections, 1);
priv->toolbar_menu_sections->supports_undo_redo = TRUE;
- priv->toolbar_menu_sections->zoom_section = g_object_ref_sink (gtk_builder_get_object (builder, "zoom_section"));
- priv->toolbar_menu_sections->extended_section = g_object_ref_sink (gtk_builder_get_object (builder, "extended_section"));
+ priv->toolbar_menu_sections->zoom_section = GTK_WIDGET (g_object_ref_sink (gtk_builder_get_object (builder, "zoom_section")));
+ priv->toolbar_menu_sections->extended_section = GTK_WIDGET (g_object_ref_sink (gtk_builder_get_object (builder, "extended_section")));
priv->zoom_controls_box = GTK_WIDGET (gtk_builder_get_object (builder, "zoom_controls_box"));
priv->zoom_level_label = GTK_WIDGET (gtk_builder_get_object (builder, "zoom_level_label"));
diff --git a/src/nautilus-progress-info-manager.c b/src/nautilus-progress-info-manager.c
index 57950a136..00868593a 100644
--- a/src/nautilus-progress-info-manager.c
+++ b/src/nautilus-progress-info-manager.c
@@ -78,7 +78,7 @@ nautilus_progress_info_manager_constructor (GType type,
if (singleton != NULL)
{
- return g_object_ref (singleton);
+ return G_OBJECT (g_object_ref (singleton));
}
retval = G_OBJECT_CLASS (nautilus_progress_info_manager_parent_class)->constructor
diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c
index 1308d9ca2..9f6571054 100644
--- a/src/nautilus-properties-window.c
+++ b/src/nautilus-properties-window.c
@@ -1596,7 +1596,7 @@ schedule_group_change (NautilusPropertiesWindow *window,
change->file = nautilus_file_ref (file);
change->group = g_strdup (group);
- change->window = g_object_ref (G_OBJECT (window));
+ change->window = GTK_WINDOW (g_object_ref (window));
change->timeout =
g_timeout_add (CHOWN_CHGRP_TIMEOUT,
(GSourceFunc) schedule_group_change_timeout,
@@ -2017,7 +2017,7 @@ schedule_owner_change (NautilusPropertiesWindow *window,
change->file = nautilus_file_ref (file);
change->owner = g_strdup (owner);
- change->window = g_object_ref (G_OBJECT (window));
+ change->window = GTK_WINDOW (g_object_ref (window));
change->timeout =
g_timeout_add (CHOWN_CHGRP_TIMEOUT,
(GSourceFunc) schedule_owner_change_timeout,