roderickc/wine-vulkan

Compiler warnings

Closed this issue · 3 comments

wine-vulkan produces the following compiler warnings with GCC 6.4.0:

../../../wine-git/dlls/winevulkan/vulkan.c: In function ?wine_vkAllocateCommandBuffers?:
../../../wine-git/dlls/winevulkan/vulkan.c:319:72: warning: passing argument 2 of ?device->funcs.p_vkAllocateCommandBuffers? from incompatible pointer type [-Wincompatible-pointer-types]
res = device->funcs.p_vkAllocateCommandBuffers(device->device, &allocate_info, &pCommandBuffers[i]->command_buffer);
^
../../../wine-git/dlls/winevulkan/vulkan.c:319:72: note: expected ?const VkCommandBufferAllocateInfo_host * {aka const struct VkCommandBufferAllocateInfo_host *}? but argument is of type ?VkCommandBufferAllocateInfo * {aka struct VkCommandBufferAllocateInfo *}?
../../../wine-git/dlls/winevulkan/vulkan.c: In function ?wine_vkCreateSwapchainKHR?:
../../../wine-git/dlls/winevulkan/vulkan.c:540:61: warning: passing argument 2 of ?vk_funcs->p_vkCreateSwapchainKHR? from incompatible pointer type [-Wincompatible-pointer-types]
return vk_funcs->p_vkCreateSwapchainKHR(device->device, &pCreateInfo_host, pAllocator, pSwapchain);
^
../../../wine-git/dlls/winevulkan/vulkan.c:540:61: note: expected ?const VkSwapchainCreateInfoKHR * {aka const struct VkSwapchainCreateInfoKHR *}? but argument is of type ?VkSwapchainCreateInfoKHR_host * {aka struct VkSwapchainCreateInfoKHR_host *}?

Latest master fixes the issues. I fixed it as part of a larger 32-bit support cleanup. Struct version is now only performed on i386 and 32-bit arm (still need to figure out a better check in vulkan_thunks.h).

Marking as resolved.

Thanks