Skip to content

Fix incompatible pointer/integer conversion errors on 32 bit

Martin Storsjö requested to merge mstorsjo/libplacebo:int-conversion into master

Clang 15 made "incompatible pointer to integer conversion" an error instead of a plain warning. This fixes errors like these:

../src/vulkan/gpu_pass.c:208:59: error: incompatible integer to pointer conversion passing 'VkPipeline' (aka 'unsigned long long') to parameter of type 'const void *' [-Wint-conversion]
        vk_dev_callback(vk, (vk_cb) destroy_pipeline, vk, *out_pipe);
                                                          ^~~~~~~~~
../src/vulkan/command.h:36:52: note: passing argument to parameter 'arg' here
                     const void *priv, const void *arg);
                                                   ^
../src/vulkan/gpu_pass.c:209:19: error: incompatible pointer to integer conversion assigning to 'VkPipeline' (aka 'unsigned long long') from 'void *' [-Wint-conversion]
        *out_pipe = NULL;
                  ^ ~~~~

Merge request reports

Loading