[gtk/gtk-3-24: 1/2] Fix -Wincompatible-pointer-types warnings



commit 882c81dab26c4264051d424020c3f68d3cd3aade
Author: Iain Lane <iain orangesquash org uk>
Date:   Wed Jan 23 12:18:18 2019 +0000

    Fix -Wincompatible-pointer-types warnings

 gtk/gtkcolorplane.c                              | 2 +-
 modules/printbackends/cups/gtkprintbackendcups.c | 2 +-
 tests/testentrycompletion.c                      | 2 +-
 tests/testgmenu.c                                | 4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkcolorplane.c b/gtk/gtkcolorplane.c
index 910f7a0801..aa964bb976 100644
--- a/gtk/gtkcolorplane.c
+++ b/gtk/gtkcolorplane.c
@@ -451,7 +451,7 @@ plane_set_property (GObject      *object,
                    GParamSpec   *pspec)
 {
   GtkColorPlane *plane = GTK_COLOR_PLANE (object);
-  GObject *adjustment;
+  GtkAdjustment *adjustment;
 
   /* Construct only properties can only be set once, these are created
    * only in order to be properly buildable from gtkcoloreditor.ui
diff --git a/modules/printbackends/cups/gtkprintbackendcups.c 
b/modules/printbackends/cups/gtkprintbackendcups.c
index ccd08e50a0..97c74d6bf4 100644
--- a/modules/printbackends/cups/gtkprintbackendcups.c
+++ b/modules/printbackends/cups/gtkprintbackendcups.c
@@ -3966,7 +3966,7 @@ cups_request_ppd (GtkPrinter *printer)
   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 --git a/tests/testentrycompletion.c b/tests/testentrycompletion.c
index 51fb6ee611..a8b0b44aea 100644
--- a/tests/testentrycompletion.c
+++ b/tests/testentrycompletion.c
@@ -233,7 +233,7 @@ animation_timer (GtkEntryCompletion *completion)
        {
          g_print ("removing model!\n");
 
-         old_store = g_object_ref (store);
+         old_store = GTK_LIST_STORE (g_object_ref (store));
          gtk_entry_completion_set_model (completion, NULL);
        }
       else
diff --git a/tests/testgmenu.c b/tests/testgmenu.c
index c92b1439bc..246a4ed33d 100644
--- a/tests/testgmenu.c
+++ b/tests/testgmenu.c
@@ -103,9 +103,9 @@ get_model (void)
   gtk_builder_add_from_string (builder, menu_markup, -1, &error);
   g_assert_no_error (error);
 
-  menu = g_object_ref (gtk_builder_get_object (builder, "edit-menu"));
+  menu = G_MENU_MODEL (g_object_ref (gtk_builder_get_object (builder, "edit-menu")));
 
-  section = g_object_ref (gtk_builder_get_object (builder, "size-placeholder"));
+  section = G_MENU_MODEL (g_object_ref (gtk_builder_get_object (builder, "size-placeholder")));
   g_object_unref (builder);
 
   for (i = 0.5; i <= 2.0; i += 0.5)


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