From a96cfa32a1e11a7fc39dbb09cd3da6c7a7fd50a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zef=20Kucia?= Date: Wed, 24 Oct 2018 13:16:25 +0200 Subject: [PATCH] demos: Check return value of ID3D12Fence_SetEventOnCompletion() (Coverity). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Józef Kucia Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- demos/gears.c | 3 ++- demos/triangle.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/demos/gears.c b/demos/gears.c index f7b8cada..72916dc7 100644 --- a/demos/gears.c +++ b/demos/gears.c @@ -218,7 +218,8 @@ static void cxg_wait_for_previous_frame(struct cx_gears *cxg) if (ID3D12Fence_GetCompletedValue(fence->fence) < v) { - ID3D12Fence_SetEventOnCompletion(fence->fence, v, fence->event); + hr = ID3D12Fence_SetEventOnCompletion(fence->fence, v, fence->event); + assert(SUCCEEDED(hr)); demo_wait_event(fence->event, INFINITE); } diff --git a/demos/triangle.c b/demos/triangle.c index 15f348f6..96ad8379 100644 --- a/demos/triangle.c +++ b/demos/triangle.c @@ -142,7 +142,8 @@ static void cxt_wait_for_previous_frame(struct cx_triangle *cxt) if (ID3D12Fence_GetCompletedValue(fence->fence) < v) { - ID3D12Fence_SetEventOnCompletion(fence->fence, v, fence->event); + hr = ID3D12Fence_SetEventOnCompletion(fence->fence, v, fence->event); + assert(SUCCEEDED(hr)); demo_wait_event(fence->event, INFINITE); }