[PATCH] dsound: if 3d sounds is disabled, just return (Coverity)

Marcus Meissner marcus at jet.franken.de
Sun Mar 1 07:04:56 CST 2015


1270009 Uninitialized scalar variable

vDistance is not set in the "disable 3dsound" branch and
also flDistance is 0 (min distance).

Its not really helping doing a lot of operations here, so return...

Ciao, Marcus
---
 dlls/dsound/sound3d.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/dsound/sound3d.c b/dlls/dsound/sound3d.c
index c53783e..439cfac 100644
--- a/dlls/dsound/sound3d.c
+++ b/dlls/dsound/sound3d.c
@@ -177,7 +177,7 @@ void DSOUND_Calc3DBuffer(IDirectSoundBufferImpl *dsb)
 			TRACE("3D processing disabled\n");
 			/* this one is here only to eliminate annoying warning message */
 			DSOUND_RecalcVolPan (&dsb->volpan);
-			break;
+			return;
 		case DS3DMODE_NORMAL:
 			TRACE("Normal 3D processing mode\n");
 			/* we need to calculate distance between buffer and listener*/
-- 
1.8.4.5




More information about the wine-patches mailing list