Bug 268991

Summary: audio/deadbeef: fix build with clang 15
Product: Ports & Packages Reporter: Dimitry Andric <dim>
Component: Individual Port(s)Assignee: Alexey Dokuchaev <danfe>
Status: Closed FIXED    
Severity: Affects Some People Flags: bugzilla: maintainer-feedback? (danfe)
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 265425    
Attachments:
Description Flags
audio/deadbeef: fix build with clang 15 none

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(+)