From: Józef Kucia jkucia@codeweavers.com
Signed-off-by: Józef Kucia jkucia@codeweavers.com --- configure.ac | 1 + libs/vkd3d/utils.c | 2 ++ 2 files changed, 3 insertions(+)
diff --git a/configure.ac b/configure.ac index abd94b514d63..7b72d3ede16f 100644 --- a/configure.ac +++ b/configure.ac @@ -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]) diff --git a/libs/vkd3d/utils.c b/libs/vkd3d/utils.c index 0329499ff771..6a910a794524 100644 --- a/libs/vkd3d/utils.c +++ b/libs/vkd3d/utils.c @@ -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;
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=55157
Your paranoid android.
=== debian10 (build log) ===
error: patch failed: configure.ac:44 Task: Patch failed to apply
=== debian10 (build log) ===
error: patch failed: configure.ac:44 Task: Patch failed to apply
On Mon, 5 Aug 2019 at 20:34, Józef Kucia joseph.kucia@gmail.com wrote:
configure.ac | 1 + libs/vkd3d/utils.c | 2 ++ 2 files changed, 3 insertions(+)
I guess. I can't say I care much for the warning or the fix.
On 8/6/19 3:54 PM, Henri Verbeet wrote:
On Mon, 5 Aug 2019 at 20:34, Józef Kucia joseph.kucia@gmail.com wrote:
configure.ac | 1 + libs/vkd3d/utils.c | 2 ++ 2 files changed, 3 insertions(+)
I guess. I can't say I care much for the warning or the fix.
Static code analyzers including Coverity complain about implicit fall-through. The comment seems to have established as the de-facto standard to silence those warnings.
Of course this particular case it obvious for the casual reader but there are other cases were the comment helps the human reader too.
bye michael