Bug 268787 - sysutils/tracker: fix build with clang 15
Summary: sysutils/tracker: fix build with clang 15
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: freebsd-gnome (Nobody)
URL:
Keywords:
Depends on:
Blocks: 265425
  Show dependency treegraph
 
Reported: 2023-01-06 16:07 UTC by Dimitry Andric
Modified: 2023-01-06 18:27 UTC (History)
1 user (show)

See Also:
tcberner: maintainer-feedback+


Attachments
sysutils/tracker: fix build with clang 15 (1.29 KB, patch)
2023-01-06 16:07 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-01-06 16:07:16 UTC
During an exp-run for llvm 15 (see bug 265425), it turned out that sysutils/tracker failed to build with clang 15:

  src/tracker-store/tracker-store.p/tracker-resources.c:1685:14: error: incompatible pointer to integer conversion assigning to 'gint' (aka 'int') from 'gconstpointer' (aka 'const void *') [-Wint-conversion]
                  subject_id = _tmp1_;
                             ^ ~~~~~~

This is because in this vala-generated C code, the glib hash table iterator code always returns pointers, even for integer keys. However, vala is inflexible in the C expressions it generates to store the outcome. Suppress -Wint-conversion to get rid of the compile error.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2023-01-06 16:07:38 UTC
Created attachment 239306 [details]
sysutils/tracker: fix build with clang 15
Comment 2 Tobias C. Berner freebsd_committer freebsd_triage 2023-01-06 16:23:04 UTC
ship it


mfg Tobias
Comment 3 commit-hook freebsd_committer freebsd_triage 2023-01-06 18:06:03 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9dc57dd478b1a87e34dfac04274646e907296818

commit 9dc57dd478b1a87e34dfac04274646e907296818
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2023-01-06 16:02:07 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2023-01-06 18:03:58 +0000

    sysutils/tracker: fix build with clang 15

    During an exp-run for llvm 15 (see bug 265425), it turned out that
    sysutils/tracker failed to build with clang 15:

      src/tracker-store/tracker-store.p/tracker-resources.c:1685:14: error: incompatible pointer to integer conversion assigning to 'gint' (aka 'int') from 'gconstpointer' (aka 'const void *') [-Wint-conversion]
                      subject_id = _tmp1_;
                                 ^ ~~~~~~

    This is because in this vala-generated C code, the glib hash table
    iterator code always returns pointers, even for integer keys. However,
    vala is inflexible in the C expressions it generates to store the
    outcome. Suppress -Wint-conversion to get rid of the compile error.

    PR:             268787
    Approved by:    tcberner (maintainer)
    MFH:            2023Q1

 sysutils/tracker/Makefile | 1 +
 1 file changed, 1 insertion(+)