From 0bbc3713de2f51c17fad935ccfd87dd68c7062ef Mon Sep 17 00:00:00 2001 From: brianosman Date: Tue, 14 Jun 2016 04:53:09 -0700 Subject: Fix compile error (uninitialized variable use) switch is already handling all cases, but some compilers don't care. This suppresses errors about potentially using vkLoadOp and vkStoreOp uninitialized. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2068523002 Review-Url: https://codereview.chromium.org/2068523002 --- src/gpu/vk/GrVkGpuCommandBuffer.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/gpu/vk/GrVkGpuCommandBuffer.cpp b/src/gpu/vk/GrVkGpuCommandBuffer.cpp index e9a13d4517..f6104a3308 100644 --- a/src/gpu/vk/GrVkGpuCommandBuffer.cpp +++ b/src/gpu/vk/GrVkGpuCommandBuffer.cpp @@ -40,6 +40,11 @@ void get_vk_load_store_ops(GrGpuCommandBuffer::LoadAndStoreOp op, *loadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE; *storeOp = VK_ATTACHMENT_STORE_OP_DONT_CARE; break; + default: + SK_ABORT("Invalid LoadAndStoreOp"); + *loadOp = VK_ATTACHMENT_LOAD_OP_LOAD; + *storeOp = VK_ATTACHMENT_STORE_OP_STORE; + break; } } -- cgit v1.2.3