Files
loongoffice/external/openldap/Wint-conversion.patch
Stephan Bergmann 49a5c32d6e external/openldap: Fix -Wint-conversion
...with recent Clang 16 trunk since
<7068aa9841>
"Strengthen -Wint-conversion to default to an error", causing

> checking for pthread_detach with <pthread.h>... no
> configure: error: could not locate pthread_detach()

because of

> configure:19227: checking for pthread_detach with <pthread.h>
> configure:19249: ~/llvm/inst/bin/clang -o conftest  -D_XOPEN_SOURCE=500 -D_DEFAULT_SOURCE -D_BSD_SOURCE  -O0 -fstrict-aliasing -fstrict-overflow -ggdb2 -gsplit-dwarf -Xclang -debug-info-kind=constructor -ggnu-pubnames -Iworkdir/UnpackedTarball/nss/dist/public/nss -Iworkdir/UnpackedTarball/nss/dist/out/include  -Iworkdir/UnpackedTarball/nss/dist/public/nss -Iworkdir/UnpackedTarball/nss/dist/out/include   -fuse-ld=lld --ld-path=~/llvm/inst/bin/ld.lld -Wl,--gdb-index -Lworkdir/UnpackedTarball/nss/dist/out/lib  -pthread conftest.c    >&5
> conftest.c:109:16: error: incompatible pointer to integer conversion passing 'void *' to parameter of type 'pthread_t' (aka 'unsigned long') [-Wint-conversion]
> pthread_detach(NULL);
>                ^~~~
> ~/llvm/inst/lib/clang/16.0.0/include/stddef.h:89:16: note: expanded from macro 'NULL'
> #  define NULL ((void*)0)
>                ^~~~~~~~~~
> /usr/include/pthread.h:269:38: note: passing argument to parameter '__th' here
> extern int pthread_detach (pthread_t __th) __THROW;
>                                      ^
> 1 error generated.
> configure:19249: $? = 1

Change-Id: I3f2b8836e7aba6536e2877b492b43de588804f86
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137758
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-08-04 12:02:20 +02:00

12 lines
146 B
Diff

--- configure
+++ configure
@@ -19241,7 +19241,7 @@
int
main ()
{
-pthread_detach(NULL);
+pthread_t t; pthread_detach(t);
;
return 0;
}