egor-tensin / setup-mingw

GitHub action to set up MinGW-w64
MIT License
74 stars 25 forks source link

`-Wformat` warnings when using `%z` #13

Closed juan-lunarg closed 1 year ago

juan-lunarg commented 1 year ago

https://github.com/KhronosGroup/Vulkan-ValidationLayers/actions/runs/4349039769/jobs/7598236919

 [12/71] Building CXX object layers/CMakeFiles/VkLayer_khronos_validation.dir/core_checks/descriptor_validation.cpp.obj
D:/a/Vulkan-ValidationLayers/Vulkan-ValidationLayers/layers/core_checks/descriptor_validation.cpp: In member function 'virtual bool CoreChecks::PreCallValidateCmdBindDescriptorSets(VkCommandBuffer, VkPipelineBindPoint, VkPipelineLayout, uint32_t, uint32_t, VkDescriptorSet_T* const*, uint32_t, const uint32_t*) const':
D:/a/Vulkan-ValidationLayers/Vulkan-ValidationLayers/layers/core_checks/descriptor_validation.cpp:345:29: warning: unknown conversion type character 'z' in format [-Wformat=]
  345 |                          "(%zu) when pipeline layout was created",
      |                             ^
D:/a/Vulkan-ValidationLayers/Vulkan-ValidationLayers/layers/core_checks/descriptor_validation.cpp:343:26: warning: too many arguments for format [-Wformat-extra-args]
  343 |                          "vkCmdBindDescriptorSets(): Sum of firstSet (%u) and descriptorSetCount (%u) is greater than "
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  344 |                          "VkPipelineLayoutCreateInfo::setLayoutCount "
      |                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  345 |                          "(%zu) when pipeline layout was created",
      |                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Looks like the version of gcc installed by setup-mingw doesn't support %z?

juan-lunarg commented 1 year ago

Is there a good way to address this? + @Biswa96 for advice.