summaryrefslogtreecommitdiffstats
path: root/src/vulkan
diff options
context:
space:
mode:
authorEric Engestrom <[email protected]>2019-05-23 16:07:38 +0100
committerEric Engestrom <[email protected]>2019-05-23 15:28:43 +0000
commit8d386e6eef8786ac0f8800c9f300b979ccad583d (patch)
tree937d92c9ef3b9d95e0c9123c6340d785bad51606 /src/vulkan
parent25afbb04c222aeadfb8caa2b906187feb7a3e2fe (diff)
vk/util: suppress warning about out-of-enum android value
src/vulkan/util/vk_enum_to_str.c: In function ‘vk_structure_type_size’: src/vulkan/util/vk_enum_to_str.c:3335:9: warning: case value ‘1000010000’ not in enumerated type ‘VkStructureType’ {aka ‘const enum VkStructureType’} [-Wswitch] case VK_STRUCTURE_TYPE_NATIVE_BUFFER_ANDROID: return sizeof(VkNativeBufferANDROID); ^~~~ Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/vulkan')
-rw-r--r--src/vulkan/util/gen_enum_to_str.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/vulkan/util/gen_enum_to_str.py b/src/vulkan/util/gen_enum_to_str.py
index 0983c4e50a5..b65bc7f7ef6 100644
--- a/src/vulkan/util/gen_enum_to_str.py
+++ b/src/vulkan/util/gen_enum_to_str.py
@@ -90,6 +90,8 @@ C_TEMPLATE = Template(textwrap.dedent(u"""\
size_t vk_structure_type_size(const struct VkBaseInStructure *item)
{
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wswitch"
switch(item->sType) {
% for struct in structs:
% if struct.extension is not None and struct.extension.define is not None:
@@ -100,9 +102,9 @@ C_TEMPLATE = Template(textwrap.dedent(u"""\
case ${struct.stype}: return sizeof(${struct.name});
% endif
%endfor
- default:
- unreachable("Undefined struct type.");
}
+ #pragma GCC diagnostic pop
+ unreachable("Undefined struct type.");
}
void vk_load_instance_commands(VkInstance instance,