mirror of
https://git.freebsd.org/ports.git
synced 2025-05-21 03:23:10 -04:00
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
11 lines
308 B
C
11 lines
308 B
C
--- threading_pthread.c.orig 2016-06-19 11:26:18 UTC
|
|
+++ threading_pthread.c
|
|
@@ -54,7 +54,7 @@ thread_start (void (*fn)(void *ctx), void *ctx) {
|
|
fprintf (stderr, "pthread_attr_destroy failed: %s\n", strerror (s));
|
|
return 0;
|
|
}
|
|
- return tid;
|
|
+ return (intptr_t)tid;
|
|
}
|
|
|
|
intptr_t
|