Add missing default return values to slience Wreturn-type

This patch adds two missing default return values to slience the
compilation warning "Wreturn-type" when building dawn.node.

Bug: dawn:1761
Change-Id: I87c8566cabba4c2e14174bf9f38f53ed3c0fdb74
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/128103
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
Jiawei Shao 2023-04-21 00:29:43 +00:00 committed by Dawn LUCI CQ
parent cf5aa73f81
commit 2d1136281e
2 changed files with 6 additions and 0 deletions

View File

@ -251,6 +251,9 @@ wgpu::BufferMapState BufferBase::APIGetMapState() const {
case BufferState::Unmapped:
case BufferState::Destroyed:
return wgpu::BufferMapState::Unmapped;
default:
UNREACHABLE();
return wgpu::BufferMapState::Unmapped;
}
}

View File

@ -164,6 +164,9 @@ WGPUCreatePipelineAsyncStatus CreatePipelineAsyncStatusFromErrorType(InternalErr
case InternalErrorType::Internal:
case InternalErrorType::OutOfMemory:
return WGPUCreatePipelineAsyncStatus_InternalError;
default:
UNREACHABLE();
return WGPUCreatePipelineAsyncStatus_Unknown;
}
}