[PATCH] dsound/tests: Removed test depending on value of undefined variable (valgrind). [1/2]

Roy Shea royshea at gmail.com
Tue Jun 24 12:29:06 CDT 2008


Removed a test that depends on the value of an uninitialized
DSBUFFERDESC.  It is not clear what error condition the test had
intended to trigger.  The second patch in this set adds back in a set of
more explicit tests.

Fixes Valgrind errors of the form:

Conditional jump or move depends on uninitialised value(s)
   DirectSoundDevice_CreateSoundBuffer (dsound.c:1526)
   IDirectSound_IDirectSound_CreateSoundBuffer (dsound.c:457)
   test_primary (dsound.c:411)
 Uninitialised value was created by a stack allocation
   test_primary (dsound.c:374)


---
 dlls/dsound/tests/dsound.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/dlls/dsound/tests/dsound.c b/dlls/dsound/tests/dsound.c
index 6c81640..fc15bad 100644
--- a/dlls/dsound/tests/dsound.c
+++ b/dlls/dsound/tests/dsound.c
@@ -407,12 +407,6 @@ static HRESULT test_primary(LPGUID lpGuid)
        "IDirectSound_CreateSoundBuffer() should have failed: rc=%s,"
        "dsbo=%p\n",DXGetErrorString8(rc),primary);

-    /* DSOUND: Error: Invalid buffer description pointer */
-    rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,0,NULL);
-    ok(rc==DSERR_INVALIDPARAM && primary==0,
-       "IDirectSound_CreateSoundBuffer() should have failed: rc=%s,"
-       "dsbo=0x%p\n",DXGetErrorString8(rc),primary);
-
     ZeroMemory(&bufdesc, sizeof(bufdesc));

     /* DSOUND: Error: Invalid size */
--
1.5.4.5



More information about the wine-patches mailing list