diff -Naur gtk+-2.24.33/gtk/gtkcellrendererspin.c gtk+-2.24.33.new/gtk/gtkcellrendererspin.c
--- gtk+-2.24.33/gtk/gtkcellrendererspin.c	2020-12-18 06:29:40.000000000 +0100
+++ gtk+-2.24.33.new/gtk/gtkcellrendererspin.c	2024-05-27 13:57:05.849221841 +0200
@@ -207,7 +207,8 @@
 	}
 
       if (obj)
-	priv->adjustment = g_object_ref_sink (obj);
+	priv->adjustment = GTK_ADJUSTMENT (g_object_ref_sink (obj));
+
       break;
     case PROP_CLIMB_RATE:
       priv->climb_rate = g_value_get_double (value);
diff -Naur gtk+-2.24.33/gtk/gtkcomboboxtext.c gtk+-2.24.33.new/gtk/gtkcomboboxtext.c
--- gtk+-2.24.33/gtk/gtkcomboboxtext.c	2020-12-18 06:29:40.000000000 +0100
+++ gtk+-2.24.33.new/gtk/gtkcomboboxtext.c	2024-05-27 13:57:05.850221847 +0200
@@ -275,7 +275,7 @@
 
       parser_data = g_slice_new0 (ItemParserData);
       parser_data->builder = g_object_ref (builder);
-      parser_data->object = g_object_ref (buildable);
+      parser_data->object = (GObject *)g_object_ref (buildable);
       parser_data->domain = gtk_builder_get_translation_domain (builder);
       *parser = item_parser;
       *data = parser_data;
diff -Naur gtk+-2.24.33/gtk/gtkimmodule.c gtk+-2.24.33.new/gtk/gtkimmodule.c
--- gtk+-2.24.33/gtk/gtkimmodule.c	2020-12-18 06:29:40.000000000 +0100
+++ gtk+-2.24.33.new/gtk/gtkimmodule.c	2024-05-27 13:57:05.833221741 +0200
@@ -662,7 +662,7 @@
 	  gboolean found;
 	  gchar *context_id;
 	  found = g_hash_table_lookup_extended (contexts_hash, *immodules_list,
-						&context_id, NULL);
+						(gpointer *) &context_id, NULL);
 	  if (found)
 	    return context_id;
 	}
diff -Naur gtk+-2.24.33/gtk/gtklabel.c gtk+-2.24.33.new/gtk/gtklabel.c
--- gtk+-2.24.33/gtk/gtklabel.c	2020-12-18 06:29:40.000000000 +0100
+++ gtk+-2.24.33.new/gtk/gtklabel.c	2024-05-27 13:57:05.851221853 +0200
@@ -1336,7 +1336,7 @@
 
       parser_data = g_slice_new0 (PangoParserData);
       parser_data->builder = g_object_ref (builder);
-      parser_data->object = g_object_ref (buildable);
+      parser_data->object = (GObject *) g_object_ref (buildable);
       *parser = pango_parser;
       *data = parser_data;
       return TRUE;
diff -Naur gtk+-2.24.33/gtk/gtkscale.c gtk+-2.24.33.new/gtk/gtkscale.c
--- gtk+-2.24.33/gtk/gtkscale.c	2020-12-18 06:29:40.000000000 +0100
+++ gtk+-2.24.33.new/gtk/gtkscale.c	2024-05-27 13:57:05.836221760 +0200
@@ -1471,7 +1471,7 @@
   mark->position = position;
  
   priv->marks = g_slist_insert_sorted_with_data (priv->marks, mark,
-                                                 (GCompareFunc) compare_marks,
+                                                 compare_marks,
                                                  GINT_TO_POINTER (
                                                    gtk_range_get_inverted (GTK_RANGE (scale)) 
                                                    ));
diff -Naur gtk+-2.24.33/gtk/gtktoolpalette.c gtk+-2.24.33.new/gtk/gtktoolpalette.c
--- gtk+-2.24.33/gtk/gtktoolpalette.c	2020-12-18 06:29:40.000000000 +0100
+++ gtk+-2.24.33.new/gtk/gtktoolpalette.c	2024-05-27 13:57:05.852221859 +0200
@@ -734,7 +734,7 @@
 
   g_ptr_array_add (palette->priv->groups, info);
   info->pos = palette->priv->groups->len - 1;
-  info->widget = g_object_ref_sink (child);
+  info->widget = (GtkToolItemGroup *)g_object_ref_sink (child);
 
   gtk_widget_set_parent (child, GTK_WIDGET (palette));
 }
diff -Naur gtk+-2.24.33/gtk/gtktreeview.c gtk+-2.24.33.new/gtk/gtktreeview.c
--- gtk+-2.24.33/gtk/gtktreeview.c	2020-12-18 06:29:40.000000000 +0100
+++ gtk+-2.24.33.new/gtk/gtktreeview.c	2024-05-27 13:57:05.855221878 +0200
@@ -14147,7 +14147,7 @@
 
   if (entry)
     {
-      tree_view->priv->search_entry = g_object_ref (entry);
+      tree_view->priv->search_entry = GTK_WIDGET (g_object_ref (entry));
       tree_view->priv->search_custom_entry_set = TRUE;
 
       if (tree_view->priv->search_entry_changed_id == 0)
diff -Naur gtk+-2.24.33/gtk/gtkuimanager.c gtk+-2.24.33.new/gtk/gtkuimanager.c
--- gtk+-2.24.33/gtk/gtkuimanager.c	2020-12-18 06:29:40.000000000 +0100
+++ gtk+-2.24.33.new/gtk/gtkuimanager.c	2024-05-27 13:57:05.840221785 +0200
@@ -503,7 +503,7 @@
   g_signal_connect (widget, "hierarchy-changed",
 		    G_CALLBACK (child_hierarchy_changed_cb),
 		    GTK_UI_MANAGER (buildable));
-  return g_object_ref (widget);
+  return G_OBJECT (g_object_ref (widget));
 }
 
 static void
diff -Naur gtk+-2.24.33/gtk/gtkwidget.c gtk+-2.24.33.new/gtk/gtkwidget.c
--- gtk+-2.24.33/gtk/gtkwidget.c	2020-12-18 06:29:40.000000000 +0100
+++ gtk+-2.24.33.new/gtk/gtkwidget.c	2024-05-27 13:57:05.857221890 +0200
@@ -10679,7 +10679,7 @@
       AccelGroupParserData *parser_data;
 
       parser_data = g_slice_new0 (AccelGroupParserData);
-      parser_data->object = g_object_ref (buildable);
+      parser_data->object = (GObject *)g_object_ref (buildable);
       *parser = accel_group_parser;
       *data = parser_data;
       return TRUE;
diff -Naur gtk+-2.24.33/gtk/tests/defaultvalue.c gtk+-2.24.33.new/gtk/tests/defaultvalue.c
--- gtk+-2.24.33/gtk/tests/defaultvalue.c	2020-12-18 06:29:40.000000000 +0100
+++ gtk+-2.24.33.new/gtk/tests/defaultvalue.c	2024-05-27 13:57:05.843221803 +0200
@@ -91,13 +91,13 @@
   klass = g_type_class_ref (type);
   
   if (g_type_is_a (type, GTK_TYPE_SETTINGS))
-    instance = g_object_ref (gtk_settings_get_default ());
+    instance = G_OBJECT (g_object_ref (gtk_settings_get_default ()));
   else if (g_type_is_a (type, GDK_TYPE_PANGO_RENDERER))
-    instance = g_object_ref (gdk_pango_renderer_get_default (gdk_screen_get_default ()));
+    instance = G_OBJECT (g_object_ref (gdk_pango_renderer_get_default (gdk_screen_get_default ())));
   else if (g_type_is_a (type, GDK_TYPE_PIXMAP))
-    instance = g_object_ref (gdk_pixmap_new (NULL, 1, 1, 1));
+    instance = G_OBJECT (g_object_ref (gdk_pixmap_new (NULL, 1, 1, 1)));
   else if (g_type_is_a (type, GDK_TYPE_COLORMAP))
-    instance = g_object_ref (gdk_colormap_new (gdk_visual_get_best (), TRUE));
+    instance = G_OBJECT (g_object_ref (gdk_colormap_new (gdk_visual_get_best (), TRUE)));
   else if (g_type_is_a (type, GDK_TYPE_WINDOW))
     {
       GdkWindowAttr attributes;
@@ -105,7 +105,7 @@
       attributes.event_mask = 0;
       attributes.width = 100;
       attributes.height = 100;
-      instance = g_object_ref (gdk_window_new (NULL, &attributes, 0));
+      instance = G_OBJECT (g_object_ref (gdk_window_new (NULL, &attributes, 0)));
     }
   else
     instance = g_object_new (type, NULL);
diff -Naur gtk+-2.24.33/modules/other/gail/gailtreeview.c gtk+-2.24.33.new/modules/other/gail/gailtreeview.c
--- gtk+-2.24.33/modules/other/gail/gailtreeview.c	2020-12-18 06:50:58.000000000 +0100
+++ gtk+-2.24.33.new/modules/other/gail/gailtreeview.c	2024-05-27 13:57:05.846221822 +0200
@@ -995,7 +995,7 @@
         gail_cell_add_state (cell, ATK_STATE_FOCUSABLE, FALSE);
         if (focus_index == i)
           {
-            gailview->focus_cell = g_object_ref (cell);
+            gailview->focus_cell = ATK_OBJECT (g_object_ref (cell));
             gail_cell_add_state (cell, ATK_STATE_FOCUSED, FALSE);
             g_signal_emit_by_name (gailview,
                                    "active-descendant-changed",
diff -Naur gtk+-2.24.33/modules/printbackends/cups/gtkprintbackendcups.c gtk+-2.24.33.new/modules/printbackends/cups/gtkprintbackendcups.c
--- gtk+-2.24.33/modules/printbackends/cups/gtkprintbackendcups.c	2020-12-18 06:29:40.000000000 +0100
+++ gtk+-2.24.33.new/modules/printbackends/cups/gtkprintbackendcups.c	2024-05-27 13:57:05.858221896 +0200
@@ -3479,7 +3479,7 @@
   g_io_channel_set_encoding (data->ppd_io, NULL, NULL);
   g_io_channel_set_close_on_unref (data->ppd_io, TRUE);
 
-  data->printer = g_object_ref (printer);
+  data->printer = (GtkPrinterCups *) g_object_ref (printer);
 
   resource = g_strdup_printf ("/printers/%s.ppd", 
                               gtk_printer_cups_get_ppd_name (GTK_PRINTER_CUPS (printer)));
diff -Naur gtk+-2.24.33/tests/testentrycompletion.c gtk+-2.24.33.new/tests/testentrycompletion.c
--- gtk+-2.24.33/tests/testentrycompletion.c	2020-12-18 06:29:42.000000000 +0100
+++ gtk+-2.24.33.new/tests/testentrycompletion.c	2024-05-27 13:57:05.859221903 +0200
@@ -237,7 +237,7 @@
 	{
 	  g_print ("removing model!\n");
 
-	  old_store = g_object_ref (gtk_entry_completion_get_model (completion));
+	  old_store = GTK_LIST_STORE (g_object_ref (gtk_entry_completion_get_model (completion)));
 	  gtk_entry_completion_set_model (completion, NULL);
 	}
       else
diff -Naur gtk+-2.24.33/tests/testmenubars.c gtk+-2.24.33.new/tests/testmenubars.c
--- gtk+-2.24.33/tests/testmenubars.c	2020-12-18 06:29:42.000000000 +0100
+++ gtk+-2.24.33.new/tests/testmenubars.c	2024-05-27 13:57:05.863221927 +0200
@@ -21,7 +21,7 @@
 #include <gtk/gtk.h>
 
 static GtkWidget *
-create_menu (depth)
+create_menu (guint depth)
 {
     GtkWidget *menu;
     GtkWidget *menuitem;
@@ -70,19 +70,19 @@
   menuitem = gtk_image_menu_item_new_from_stock (GTK_STOCK_HOME, NULL);
   gtk_menu_shell_append (GTK_MENU_SHELL (menubar), menuitem);
   gtk_label_set_angle (GTK_LABEL (GTK_BIN (menuitem)->child), angle);
-  menu = create_menu (2, TRUE);
+  menu = create_menu (2);
   gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), menu);
 
   menuitem = gtk_menu_item_new_with_label ("foo");
   gtk_menu_shell_append (GTK_MENU_SHELL (menubar), menuitem);
   gtk_label_set_angle (GTK_LABEL (GTK_BIN (menuitem)->child), angle);
-  menu = create_menu (2, TRUE);
+  menu = create_menu (2);
   gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), menu);
 
   menuitem = gtk_menu_item_new_with_label ("bar");
   gtk_menu_shell_append (GTK_MENU_SHELL (menubar), menuitem);
   gtk_label_set_angle (GTK_LABEL (GTK_BIN (menuitem)->child), angle);
-  menu = create_menu (2, TRUE);
+  menu = create_menu (2);
   gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), menu);
 
   return menubar;
