From: Yoann Congal <[email protected]> Backport 2 patchs to fix incompatible-pointer-types error when building gtk+3-native on Fedora 41 host: tests/testinput.c:197:79: error: passing argument 1 of ‘gdk_event_get_source_device’ from incompatible pointer type [-Wincompatible-pointer-types] gtk/gtklabel.c:4235:32: error: passing argument 1 of ‘gtk_widget_queue_resize’ from incompatible pointer type [-Wincompatible-pointer-types]
On autobuilder: fedora41-vk-1:~$ gcc --version gcc (GCC) 14.3.1 20251022 (Red Hat 14.3.1-4) GCC 14 notoriously restricted how pointer types are converted: https://gcc.gnu.org/gcc-14/porting_to.html#incompatible-pointer-types Suggested-by: Fabien Thomas <[email protected]> Signed-off-by: Yoann Congal <[email protected]> --- ...-type-when-calling-GtkWidget-methods.patch | 28 +++++++++++ ...ests-Add-GdkEvent-casts-in-testinput.patch | 48 +++++++++++++++++++ meta/recipes-gnome/gtk+/gtk+3_3.24.34.bb | 2 + 3 files changed, 78 insertions(+) create mode 100644 meta/recipes-gnome/gtk+/gtk+3/0001-Use-the-right-type-when-calling-GtkWidget-methods.patch create mode 100644 meta/recipes-gnome/gtk+/gtk+3/0002-tests-Add-GdkEvent-casts-in-testinput.patch diff --git a/meta/recipes-gnome/gtk+/gtk+3/0001-Use-the-right-type-when-calling-GtkWidget-methods.patch b/meta/recipes-gnome/gtk+/gtk+3/0001-Use-the-right-type-when-calling-GtkWidget-methods.patch new file mode 100644 index 00000000000..76de5630655 --- /dev/null +++ b/meta/recipes-gnome/gtk+/gtk+3/0001-Use-the-right-type-when-calling-GtkWidget-methods.patch @@ -0,0 +1,28 @@ +From a3e82f20a1a1e7d8ffbc960a8bb4aa65b0d151ee Mon Sep 17 00:00:00 2001 +From: Yoann Congal <[email protected]> +Date: Tue, 6 Dec 2022 21:49:22 +0000 +Subject: [PATCH] Use the right type when calling GtkWidget methods + +From: Emmanuele Bassi <[email protected]> + +Let's avoid complaints from the compiler. + +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/gtk/-/commit/a3e82f20a1a1e7d8ffbc960a8bb4aa65b0d151ee] +Signed-off-by: Yoann Congal <[email protected]> +--- + gtk/gtklabel.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c +index 7933ab2af73..40a569004b6 100644 +--- a/gtk/gtklabel.c ++++ b/gtk/gtklabel.c +@@ -4232,7 +4232,7 @@ gtk_label_style_updated (GtkWidget *widget) + if (change == NULL || gtk_css_style_change_affects (change, GTK_CSS_AFFECTS_FONT)) + { + gtk_label_clear_layout (GTK_LABEL (widget)); +- gtk_widget_queue_resize (label); ++ gtk_widget_queue_resize (widget); + } + + if (change == NULL || gtk_css_style_change_affects (change, GTK_CSS_AFFECTS_TEXT_ATTRS) || diff --git a/meta/recipes-gnome/gtk+/gtk+3/0002-tests-Add-GdkEvent-casts-in-testinput.patch b/meta/recipes-gnome/gtk+/gtk+3/0002-tests-Add-GdkEvent-casts-in-testinput.patch new file mode 100644 index 00000000000..c6ec597384e --- /dev/null +++ b/meta/recipes-gnome/gtk+/gtk+3/0002-tests-Add-GdkEvent-casts-in-testinput.patch @@ -0,0 +1,48 @@ +From 76bc2a57136fd6cf0374fa3f86a7ba646b779803 Mon Sep 17 00:00:00 2001 +From: Yoann Congal <[email protected]> +Date: Fri, 19 Jan 2024 10:41:33 +0000 +Subject: [PATCH] tests: Add GdkEvent casts in testinput + +From: David King <[email protected]> + +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/gtk/-/commit/76bc2a57136fd6cf0374fa3f86a7ba646b779803] +Signed-off-by: Yoann Congal <[email protected]> +--- + tests/testinput.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/tests/testinput.c b/tests/testinput.c +index b68552a4280..3d4d7f6f875 100644 +--- a/tests/testinput.c ++++ b/tests/testinput.c +@@ -194,7 +194,7 @@ button_press_event (GtkWidget *widget, GdkEventButton *event) + + print_axes (event->device, event->axes); + gdk_event_get_axis ((GdkEvent *)event, GDK_AXIS_PRESSURE, &pressure); +- draw_brush (widget, gdk_device_get_source (gdk_event_get_source_device (event)), ++ draw_brush (widget, gdk_device_get_source (gdk_event_get_source_device ((GdkEvent *)event)), + event->x, event->y, pressure); + + motion_time = event->time; +@@ -239,10 +239,10 @@ motion_notify_event (GtkWidget *widget, GdkEventMotion *event) + gdk_device_get_axis (event->device, events[i]->axes, GDK_AXIS_X, &x); + gdk_device_get_axis (event->device, events[i]->axes, GDK_AXIS_Y, &y); + gdk_device_get_axis (event->device, events[i]->axes, GDK_AXIS_PRESSURE, &pressure); +- draw_brush (widget, gdk_device_get_source (gdk_event_get_source_device (event)), ++ draw_brush (widget, gdk_device_get_source (gdk_event_get_source_device ((GdkEvent *)event)), + x, y, pressure); + +- print_axes (gdk_event_get_source_device (event), events[i]->axes); ++ print_axes (gdk_event_get_source_device ((GdkEvent *)event), events[i]->axes); + } + gdk_device_free_history (events, n_events); + } +@@ -252,7 +252,7 @@ motion_notify_event (GtkWidget *widget, GdkEventMotion *event) + + gdk_event_get_axis ((GdkEvent *)event, GDK_AXIS_PRESSURE, &pressure); + +- draw_brush (widget, gdk_device_get_source (gdk_event_get_source_device (event)), ++ draw_brush (widget, gdk_device_get_source (gdk_event_get_source_device ((GdkEvent *)event)), + event->x, event->y, pressure); + } + motion_time = event->time; diff --git a/meta/recipes-gnome/gtk+/gtk+3_3.24.34.bb b/meta/recipes-gnome/gtk+/gtk+3_3.24.34.bb index e6c8e43923a..01677e33f8a 100644 --- a/meta/recipes-gnome/gtk+/gtk+3_3.24.34.bb +++ b/meta/recipes-gnome/gtk+/gtk+3_3.24.34.bb @@ -7,6 +7,8 @@ SRC_URI = "${GNOME_MIRROR}/gtk+/${MAJ_VER}/gtk+-${PV}.tar.xz \ file://0003-Add-disable-opengl-configure-option.patch \ file://link_fribidi.patch \ file://CVE-2024-6655.patch \ + file://0001-Use-the-right-type-when-calling-GtkWidget-methods.patch \ + file://0002-tests-Add-GdkEvent-casts-in-testinput.patch \ " SRC_URI[sha256sum] = "dbc69f90ddc821b8d1441f00374dc1da4323a2eafa9078e61edbe5eeefa852ec"
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#233232): https://lists.openembedded.org/g/openembedded-core/message/233232 Mute This Topic: https://lists.openembedded.org/mt/118341922/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
