...with recent Clang 16 trunk since
<7068aa9841>
"Strengthen -Wint-conversion to default to an error", causing
> workdir/UnpackedTarball/epoxy/src/gl_generated_dispatch.c:114547:77: error: incompatible integer to pointer conversion passing 'uintptr_t' (aka 'unsigned long') to parameter of type 'GLhandleARB' (aka 'void *') [-Wint-conversion]
> GEN_THUNKS(glAttachObjectARB, (GLhandleARB containerObj, GLhandleARB obj), ((uintptr_t)containerObj, (uintptr_t)obj))
> ^~~~~~~~~~~~~~~~~~~~~~~
> workdir/UnpackedTarball/epoxy/src/dispatch_common.h:150:40: note: expanded from macro 'GEN_THUNKS'
> GEN_GLOBAL_REWRITE_PTR(name, args, passthrough) \
> ^~~~~~~~~~~
> workdir/UnpackedTarball/epoxy/src/dispatch_common.h:95:14: note: expanded from macro 'GEN_GLOBAL_REWRITE_PTR'
> name passthrough; \
> ^~~~~~~~~~~
etc.
That only hit on macOS because of the different
> #ifdef __APPLE__
> typedef void *GLhandleARB;
> #else
> typedef unsigned int GLhandleARB;
> #endif
in OpenGL's glext.h, which
<0cfb0a044b>
"Fix most GLhandleARB warnings on OS X with a big comment in our code" had tried
to address by adding "a cast to uintptr_t to shut up the compiler" in its
src/gen_dispatch.py (but without stating what compiler diagnostics exactly were
supposed to be silenced by that cast that now started to cause the above issues
with Clang 16 trunk).
It turns out that at least my macOS build with Clang 16 trunk builds fine
without that cast, so just drop it for good. (And patching epoxy's
src/gen_dispatch.py means that UnpackedTarball_epoxy needs to switch from
gb_UnpackedTarball_set_pre_action to gb_UnpackedTarball_set_post_action.)
Change-Id: I2c87bca2cc5510d17098028d4532989f48e349a9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138407
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>