From 75c492a0ccc48161ef5e81c7046242d73db1497c Mon Sep 17 00:00:00 2001 From: Sarah Mashayekhi Date: Thu, 3 Sep 2020 17:17:37 +0000 Subject: [PATCH] [writer] add a return to convert_image_format_to_spv This CL adds a return to convert_image_format_to_spv function to stop clang from failing with this error: "control reaches end of non-void function." because we haven't covered all the enums in the switch. Change-Id: Ibcb02ff52ca4c6e597a36f5c3d57e41df9e7b02a Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28061 Reviewed-by: David Neto Commit-Queue: David Neto --- src/writer/spirv/builder.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/writer/spirv/builder.cc b/src/writer/spirv/builder.cc index 193584c2b7..fc012584c8 100644 --- a/src/writer/spirv/builder.cc +++ b/src/writer/spirv/builder.cc @@ -2316,6 +2316,7 @@ SpvImageFormat Builder::convert_image_format_to_spv( case ast::type::ImageFormat::kRgba32Float: return SpvImageFormatRgba32f; } + return SpvImageFormatUnknown; } } // namespace spirv