[PATCH 4/5] ddraw/tests: Fix a couple of return value checks.
Henri Verbeet
hverbeet at codeweavers.com
Mon Mar 12 13:56:09 CDT 2012
---
dlls/ddraw/tests/ddraw1.c | 2 +-
dlls/ddraw/tests/ddraw2.c | 2 +-
dlls/ddraw/tests/ddrawmodes.c | 2 +-
dlls/ddraw/tests/dsurface.c | 10 +++++-----
dlls/ddraw/tests/visual.c | 4 ++--
5 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c
index 9ba428f..fbdaf4b 100644
--- a/dlls/ddraw/tests/ddraw1.c
+++ b/dlls/ddraw/tests/ddraw1.c
@@ -1249,7 +1249,7 @@ static void test_ck_rgba(void)
ok(SUCCEEDED(hr), "Failed to create destination surface, hr %#x.\n", hr);
hr = IDirectDrawSurface_QueryInterface(surface, &IID_IDirect3DTexture, (void **)&texture);
ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#x.\n", hr);
- IDirect3DTexture_GetHandle(texture, device, &texture_handle);
+ hr = IDirect3DTexture_GetHandle(texture, device, &texture_handle);
ok(SUCCEEDED(hr), "Failed to get texture handle, hr %#x.\n", hr);
IDirect3DTexture_Release(texture);
diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c
index 6931364..7a47f73 100644
--- a/dlls/ddraw/tests/ddraw2.c
+++ b/dlls/ddraw/tests/ddraw2.c
@@ -1511,7 +1511,7 @@ static void test_ck_rgba(void)
ok(SUCCEEDED(hr), "Failed to create destination surface, hr %#x.\n", hr);
hr = IDirectDrawSurface_QueryInterface(surface, &IID_IDirect3DTexture2, (void **)&texture);
ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#x.\n", hr);
- IDirect3DTexture2_GetHandle(texture, device, &texture_handle);
+ hr = IDirect3DTexture2_GetHandle(texture, device, &texture_handle);
ok(SUCCEEDED(hr), "Failed to get texture handle, hr %#x.\n", hr);
IDirect3DTexture2_Release(texture);
diff --git a/dlls/ddraw/tests/ddrawmodes.c b/dlls/ddraw/tests/ddrawmodes.c
index a4b71fb..725750d 100644
--- a/dlls/ddraw/tests/ddrawmodes.c
+++ b/dlls/ddraw/tests/ddrawmodes.c
@@ -624,7 +624,7 @@ static void testsurface(void)
SetBkColor(hdc, RGB(0, 0, 255));
SetTextColor(hdc, RGB(255, 255, 0));
TextOut(hdc, 0, 0, testMsg, lstrlen(testMsg));
- IDirectDrawSurface_ReleaseDC(lpDDSBack, hdc);
+ rc = IDirectDrawSurface_ReleaseDC(lpDDSBack, hdc);
ok(rc==DD_OK, "IDirectDrawSurface_ReleaseDC returned: %x\n",rc);
while (1)
diff --git a/dlls/ddraw/tests/dsurface.c b/dlls/ddraw/tests/dsurface.c
index 85a5d7a..2937258 100644
--- a/dlls/ddraw/tests/dsurface.c
+++ b/dlls/ddraw/tests/dsurface.c
@@ -2947,7 +2947,7 @@ static void PaletteTest(void)
if (FAILED(hr)) goto err;
/* Read back the palette and verify the entries. Without DDPCAPS_ALLOW256 set
/ entry 0 and 255 should have been overwritten with black and white */
- IDirectDrawPalette_GetEntries(palette , 0, 0, 256, &palEntries[0]);
+ hr = IDirectDrawPalette_GetEntries(palette , 0, 0, 256, &palEntries[0]);
ok(hr == DD_OK, "GetEntries failed with %08x\n", hr);
if(hr == DD_OK)
{
@@ -2967,9 +2967,9 @@ static void PaletteTest(void)
/* CreatePalette without DDPCAPS_ALLOW256 ignores entry 0 and 255,
/ now check we are able to update the entries afterwards. */
- IDirectDrawPalette_SetEntries(palette , 0, 0, 256, &Table[0]);
+ hr = IDirectDrawPalette_SetEntries(palette , 0, 0, 256, &Table[0]);
ok(hr == DD_OK, "SetEntries failed with %08x\n", hr);
- IDirectDrawPalette_GetEntries(palette , 0, 0, 256, &palEntries[0]);
+ hr = IDirectDrawPalette_GetEntries(palette , 0, 0, 256, &palEntries[0]);
ok(hr == DD_OK, "GetEntries failed with %08x\n", hr);
if(hr == DD_OK)
{
@@ -2987,7 +2987,7 @@ static void PaletteTest(void)
ok(hr == DD_OK, "CreatePalette failed with %08x\n", hr);
if (FAILED(hr)) goto err;
- IDirectDrawPalette_GetEntries(palette , 0, 0, 256, &palEntries[0]);
+ hr = IDirectDrawPalette_GetEntries(palette , 0, 0, 256, &palEntries[0]);
ok(hr == DD_OK, "GetEntries failed with %08x\n", hr);
if(hr == DD_OK)
{
@@ -3752,7 +3752,7 @@ static void GetDCFormatTest(void)
if(SUCCEEDED(hr))
{
- IDirectDrawSurface7_ReleaseDC(surface, dc);
+ hr = IDirectDrawSurface7_ReleaseDC(surface, dc);
ok(hr == DD_OK, "IDirectDrawSurface7_ReleaseDC failed, hr = 0x%08x\n", hr);
dc = 0;
}
diff --git a/dlls/ddraw/tests/visual.c b/dlls/ddraw/tests/visual.c
index 1bac70c..73d2b1a 100644
--- a/dlls/ddraw/tests/visual.c
+++ b/dlls/ddraw/tests/visual.c
@@ -234,7 +234,7 @@ static void set_viewport_size(IDirect3DDevice7 *device)
memset(&ddsd, 0, sizeof(ddsd));
ddsd.dwSize = sizeof(ddsd);
- IDirectDrawSurface7_GetSurfaceDesc(target, &ddsd);
+ hr = IDirectDrawSurface7_GetSurfaceDesc(target, &ddsd);
ok(hr == D3D_OK, "IDirectDrawSurface7_GetSurfaceDesc returned %08x\n", hr);
IDirectDrawSurface7_Release(target);
@@ -360,7 +360,7 @@ static void lighting_test(IDirect3DDevice7 *device)
Indices, 6 /* Indexcount */, 0 /* flags */);
ok(hr == D3D_OK, "IDirect3DDevice7_DrawIndexedPrimitiveUP failed with %08x\n", hr);
- IDirect3DDevice7_EndScene(device);
+ hr = IDirect3DDevice7_EndScene(device);
ok(hr == D3D_OK, "IDirect3DDevice7_EndScene failed with %08x\n", hr);
}
--
1.7.3.4
More information about the wine-patches
mailing list