Bug 268991 - audio/deadbeef: fix build with clang 15
Summary: audio/deadbeef: 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: Alexey Dokuchaev
URL:
Keywords:
Depends on:
Blocks: 265425
  Show dependency treegraph
 
Reported: 2023-01-16 19:13 UTC by Dimitry Andric
Modified: 2023-02-07 20:26 UTC (History)
0 users

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


Attachments
audio/deadbeef: fix build with clang 15 (1.22 KB, patch)
2023-01-16 19:14 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-16 19:13:10 UTC
During an exp-run for llvm 15 (see bug 265425), it turned out that audio/deadbeef failed to build with clang 15:

  threading_pthread.c:57:12: error: incompatible pointer to integer conversion returning 'pthread_t' (aka 'struct pthread *') from a function with result type 'intptr_t' (aka 'long') [-Wint-conversion]
      return tid;
             ^~~

This is because it is trying to implicitly convert a pthread_t into an integer. Add a cast to suppress the warning.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2023-01-16 19:14:11 UTC
Created attachment 239509 [details]
audio/deadbeef: fix build with clang 15
Comment 2 commit-hook freebsd_committer freebsd_triage 2023-02-07 20:07:03 UTC
A commit in branch main references this bug:

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

commit eac5d2ab2c062e5ed4d9c67c7490eb4f1f04ecb7
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2023-01-07 16:20:14 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2023-02-07 20:05:36 +0000

    audio/deadbeef: fix build with clang 15

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

      threading_pthread.c:57:12: error: incompatible pointer to integer conversion returning 'pthread_t' (aka 'struct pthread *') from a function with result type 'intptr_t' (aka 'long') [-Wint-conversion]
          return tid;
                 ^~~

    This is because it is trying to implicitly convert a pthread_t into an
    integer. Add a cast to suppress the warning.

    PR:             268991
    Approved by:    maintainer timeout (2 weeks)
    MFH:            2023Q1

 audio/deadbeef/files/patch-threading__pthread.c (new) | 11 +++++++++++
 1 file changed, 11 insertions(+)