Bug 272079 - net-im/telepathy-glib: fix build with clang 16
Summary: net-im/telepathy-glib: fix build with clang 16
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-gnome (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-19 19:24 UTC by Dimitry Andric
Modified: 2023-06-19 19:25 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (gnome)


Attachments
net-im/telepathy-glib: fix build with clang 16 (1.86 KB, patch)
2023-06-19 19:25 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric freebsd_committer freebsd_triage 2023-06-19 19:24:49 UTC
Clang 16 has a new error about incompatible function types, which shows
up when net-im/telepathy-glib:

  protocol.c:1794:42: error: incompatible function pointer types passing 'void (GValueArray *)' (aka 'void (struct _GValueArray *)') to parameter of type 'GDestroyNotify' (aka 'void (*)(void *)') [-Wincompatible-function-pointer-types]
    param_specs = g_ptr_array_new_full (i, tp_value_array_free);
                                           ^~~~~~~~~~~~~~~~~~~
  /usr/local/include/glib-2.0/glib/garray.h:175:27: note: passing argument to parameter 'element_free_func' here
                                             GDestroyNotify    element_free_func);
                                                               ^

It looks like telepathy-glib added this tp_value_array_free function to
work around compatibility issues, and later on in the code they cast a
similar instance of tp_value_array_free to GDestroyNotify, so use the
same approach for this error.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2023-06-19 19:25:18 UTC
Created attachment 242880 [details]
net-im/telepathy-glib: fix build with clang 16