Bug 271485 - devel/libgee: fix build with clang 16
Summary: devel/libgee: fix build with clang 16
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Koop Mast
URL:
Keywords:
Depends on:
Blocks: 271047
  Show dependency treegraph
 
Reported: 2023-05-18 11:51 UTC by Dimitry Andric
Modified: 2023-06-04 16:23 UTC (History)
1 user (show)

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


Attachments
devel/libgee: fix build with clang 16 (1.55 KB, patch)
2023-05-18 11:51 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-05-18 11:51:25 UTC
Clang 16 has a new error about incompatible function types, which shows up when building devel/libgee:

  hashmap.c:4089:23: error: incompatible function pointer types assigning to 'gboolean (*)(GeeMapIterator *)' (aka 'int (*)(struct _GeeMapIterator *)') from 'gboolean (GeeHashMapNodeIterator *)' (aka 'int (struct _GeeHashMapNodeIterator *)') [-Wincompatible-function-pointer-types]
          iface->get_read_only = gee_hash_map_map_iterator_real_get_read_only;
                               ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Since the error occurs in vala-generated code, it does not make sense to patch the .c file. Suppress the warning instead.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2023-05-18 11:51:47 UTC
Created attachment 242246 [details]
devel/libgee: fix build with clang 16
Comment 2 commit-hook freebsd_committer freebsd_triage 2023-06-04 16:22:50 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=28b30b0f681fbd8166afda9a633c04d7939ed6d6

commit 28b30b0f681fbd8166afda9a633c04d7939ed6d6
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2023-05-18 11:47:43 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2023-06-04 16:21:23 +0000

    devel/libgee: fix build with clang 16

    Clang 16 has a new error about incompatible function types, which shows
    up when building devel/libgee:

      hashmap.c:4089:23: error: incompatible function pointer types assigning to 'gboolean (*)(GeeMapIterator *)' (aka 'int (*)(struct _GeeMapIterator *)') from 'gboolean (GeeHashMapNodeIterator *)' (aka 'int (struct _GeeHashMapNodeIterator *)') [-Wincompatible-function-pointer-types]
              iface->get_read_only = gee_hash_map_map_iterator_real_get_read_only;
                                   ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Since the error occurs in vala-generated code, it does not make sense to
    patch the .c file. Suppress the warning instead.

    PR:             271485
    Approved by:    maintainer timeout (2 weeks)
    MFH:            2023Q2

 devel/libgee/Makefile | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)