build: Enable -Wimplicit-fallthrough.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia 2019-08-05 18:03:38 +02:00 committed by Alexandre Julliard
parent 0184917520
commit 8b49b6e057
2 changed files with 3 additions and 0 deletions

View File

@ -44,6 +44,7 @@ AS_IF([test "x${GCC}" = "xyes"],
[VKD3D_CFLAGS="-Wall -pipe"
VKD3D_CHECK_CFLAGS([-std=c99])
VKD3D_CHECK_CFLAGS([-Wdeclaration-after-statement])
VKD3D_CHECK_CFLAGS([-Wimplicit-fallthrough])
VKD3D_CHECK_CFLAGS([-Wmissing-prototypes])
VKD3D_CHECK_CFLAGS([-Wunused-but-set-parameter])
VKD3D_CHECK_CFLAGS([-Wvla])

View File

@ -702,10 +702,12 @@ HRESULT hresult_from_vk_result(VkResult vr)
return S_OK;
case VK_ERROR_OUT_OF_DEVICE_MEMORY:
WARN("Out of device memory.\n");
/* fall-through */
case VK_ERROR_OUT_OF_HOST_MEMORY:
return E_OUTOFMEMORY;
default:
FIXME("Unhandled VkResult %d.\n", vr);
/* fall-through */
case VK_ERROR_DEVICE_LOST:
case VK_ERROR_EXTENSION_NOT_PRESENT:
return E_FAIL;