Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 915040

Summary: media-gfx/gnome-font-viewer-44.0 fails to build with clang-17: incompatible function pointer types
Product: Gentoo Linux Reporter: ppw0
Component: Current packagesAssignee: Gentoo Linux Gnome Desktop Team <gnome>
Status: RESOLVED FIXED    
Severity: normal Keywords: PATCH
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://gitlab.gnome.org/GNOME/gnome-font-viewer/-/merge_requests/54
https://gitlab.gnome.org/GNOME/gnome-font-viewer/-/merge_requests/60
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 870412    
Attachments: build log
emerge --info
patch

Description ppw0 2023-10-01 15:45:39 UTC
Created attachment 871941 [details]
build log

When using clang-17 as the compiler, gnome-font-viewer-44.0 will present an error during emerge:
----
../gnome-font-viewer-44.0/src/font-view-window.c:875:77: error: incompatible function pointer types passing 'void (FontViewWindow *)' (aka 'void (struct _FontViewWindow *)') to parameter of type 'GtkWidgetActionActivateFunc' (aka 'void (*)(struct _GtkWidget *, const char *, struct _GVariant *)') [-Wincompatible-function-pointer-types]
  875 |   gtk_widget_class_install_action (widget_class, "win.toggle-search", NULL, action_toggle_search_cb);
      |                                                                             ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/gtk-4.0/gtk/gtkwidget.h:955:87: note: passing argument to parameter 'activate' here
  955 |                                                          GtkWidgetActionActivateFunc  activate);
      |                                                                                       ^
1 error generated.
---
Attaching logs and proposed patch.
Comment 1 ppw0 2023-10-01 15:46:24 UTC
Created attachment 871942 [details]
emerge --info
Comment 2 ppw0 2023-10-01 15:47:04 UTC
Created attachment 871943 [details, diff]
patch
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-10-01 15:51:47 UTC
Matt seems to have sent a PR upstream already for this: https://gitlab.gnome.org/GNOME/gnome-font-viewer/-/merge_requests/54.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-03-17 03:31:16 UTC
commit e8b9fd5af31bc85a1d1f73ad57c889b698833bc9
Author: Guillermo Joandet <gjoandet@gmail.com>
Date:   Mon Sep 18 19:38:23 2023 -0300

    media-gfx/gnome-font-viewer: Version bump to 45.0

    Signed-off-by: Guillermo Joandet <gjoandet@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/32915
    Signed-off-by: Matt Turner <mattst88@gentoo.org>