[PATCH] dsound: skip unknown sizes in tests (Coverity)

Marcus Meissner marcus at jet.franken.de
Wed Oct 3 09:01:25 CDT 2012


Hi,

Coverity does not like uninitialized variable codepaths, so
skip/return; CID 214663

Ciao, Marcus
---
 dlls/dsound/tests/ds3d8.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/dlls/dsound/tests/ds3d8.c b/dlls/dsound/tests/ds3d8.c
index c432d35..d825a6f 100644
--- a/dlls/dsound/tests/ds3d8.c
+++ b/dlls/dsound/tests/ds3d8.c
@@ -223,6 +223,9 @@ void test_buffer8(LPDIRECTSOUND8 dso, LPDIRECTSOUNDBUFFER * dsbo,
         rc=IDirectSoundBuffer_GetFormat(*dsbo,(WAVEFORMATEX*)&wfxe,size,NULL);
         wfx = wfxe.Format;
         ieee = IsEqualGUID(&wfxe.SubFormat, &KSDATAFORMAT_SUBTYPE_IEEE_FLOAT);
+    } else {
+        skip("invalid size of format, cannot handle that.\n");
+        return;
     }
     ok(rc==DS_OK,"IDirectSoundBuffer_GetFormat() failed: %08x\n", rc);
     if (rc==DS_OK && winetest_debug > 1) {
-- 
1.7.3.4




More information about the wine-patches mailing list