anv: avoid warning when switching in VkStructureType
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Mon, 16 Jul 2018 20:50:07 +0000 (13:50 -0700)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Wed, 18 Jul 2018 15:29:51 +0000 (08:29 -0700)
commit01d02e8906a9bc327d257c7bccba39f6af74045f
treea22981ff15c7362a16fef4bbde4b459eab10be8d
parentdf8f1637fa08dcf876840a315a5b8461a6ce890a
anv: avoid warning when switching in VkStructureType

When one of the cases is not part of the enum, the compilar complains:

../../src/intel/vulkan/anv_formats.c: In function ‘anv_GetPhysicalDeviceFormatProperties2’:
../../src/intel/vulkan/anv_formats.c:728:7: warning: case value ‘1000001004’ not in enumerated type ‘VkStructureType’ {aka ‘enum VkStructureType’} [-Wswitch]
       case VK_STRUCTURE_TYPE_WSI_FORMAT_MODIFIER_PROPERTIES_LIST_MESA:
       ^~~~

Given the switch has an "default:" case, we don't lose anything by
switching on the unsigned value to avoid the warning.

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
src/intel/vulkan/anv_formats.c