Nikolay Sivov : qcap/tests: Check method return values (Coverity).

Alexandre Julliard julliard at winehq.org
Mon Mar 31 13:32:43 CDT 2014


Module: wine
Branch: master
Commit: ddbcd24178455f108d510b22016dc0347cf53b5d
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=ddbcd24178455f108d510b22016dc0347cf53b5d

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Sun Mar 30 16:07:11 2014 +0400

qcap/tests: Check method return values (Coverity).

---

 dlls/qcap/tests/qcap.c |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/dlls/qcap/tests/qcap.c b/dlls/qcap/tests/qcap.c
index 4ad4d7c..19177bd 100644
--- a/dlls/qcap/tests/qcap.c
+++ b/dlls/qcap/tests/qcap.c
@@ -1055,9 +1055,12 @@ static HRESULT WINAPI MemInputPin_Receive(IMemInputPin *iface, IMediaSample *pSa
     REFERENCE_TIME off, tmp;
     LARGE_INTEGER li;
     BYTE *data;
+    HRESULT hr;
 
-    IMediaSample_GetTime(pSample, &off, &tmp);
-    IMediaSample_GetPointer(pSample, &data);
+    hr = IMediaSample_GetTime(pSample, &off, &tmp);
+    ok(hr == S_OK, "got 0x%08x\n", hr);
+    hr = IMediaSample_GetPointer(pSample, &data);
+    ok(hr == S_OK, "got 0x%08x\n", hr);
     li.QuadPart = off;
     IStream_Seek(avi_stream, li, STREAM_SEEK_SET, NULL);
     IStream_Write(avi_stream, data, IMediaSample_GetActualDataLength(pSample), NULL);
@@ -1826,7 +1829,8 @@ static void test_AviMux(char *arg)
     ok(memalloc != &MemAllocator, "memalloc == &MemAllocator\n");
     IMemAllocator_Release(memalloc);
 
-    CreateStreamOnHGlobal(NULL, TRUE, &avi_stream);
+    hr = CreateStreamOnHGlobal(NULL, TRUE, &avi_stream);
+    ok(hr == S_OK, "got 0x%08x\n", hr);
     SET_EXPECT(MediaSeeking_GetPositions);
     SET_EXPECT(MemInputPin_QueryInterface_IStream);
     hr = IBaseFilter_Run(avimux, 0);




More information about the wine-cvs mailing list