b2760b7d2a
...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>
26 lines
1 KiB
Diff
26 lines
1 KiB
Diff
--- src/gen_dispatch.py
|
|
+++ src/gen_dispatch.py
|
|
@@ -123,20 +123,16 @@
|
|
#
|
|
# We retain those aliases. In the x86_64 ABI, the first 6
|
|
# args are stored in 64-bit registers, so the calls end up
|
|
- # being the same despite the different types. We just need to
|
|
- # add a cast to uintptr_t to shut up the compiler.
|
|
+ # being the same despite the different types.
|
|
if arg_type == 'GLhandleARB':
|
|
assert len(self.args) < 6
|
|
- arg_list_name = '(uintptr_t)' + arg_name
|
|
- else:
|
|
- arg_list_name = arg_name
|
|
|
|
self.args.append((arg_type, arg_name))
|
|
if self.args_decl == 'void':
|
|
- self.args_list = arg_list_name
|
|
+ self.args_list = arg_name
|
|
self.args_decl = arg_type + ' ' + arg_name
|
|
else:
|
|
- self.args_list += ', ' + arg_list_name
|
|
+ self.args_list += ', ' + arg_name
|
|
self.args_decl += ', ' + arg_type + ' ' + arg_name
|
|
|
|
def add_provider(self, condition, loader, condition_name):
|