Andrew Eikum : dsound: Handle default case in dsound3d mode switch ( Coverity).

Alexandre Julliard julliard at winehq.org
Tue Feb 28 03:45:55 CST 2017


Module: wine
Branch: oldstable
Commit: 8e00e636ec34455c4836ef3dd4c347594cdd1c6a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=8e00e636ec34455c4836ef3dd4c347594cdd1c6a

Author: Andrew Eikum <aeikum at codeweavers.com>
Date:   Wed Feb 10 12:54:15 2016 -0600

dsound: Handle default case in dsound3d mode switch (Coverity).

Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit f461610e6c93f74e7eb07567f0740c8f357eb951)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>

---

 dlls/dsound/sound3d.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/dlls/dsound/sound3d.c b/dlls/dsound/sound3d.c
index e428053..840ab93 100644
--- a/dlls/dsound/sound3d.c
+++ b/dlls/dsound/sound3d.c
@@ -170,11 +170,6 @@ void DSOUND_Calc3DBuffer(IDirectSoundBufferImpl *dsb)
 	
 	switch (dsb->ds3db_ds3db.dwMode)
 	{
-		case DS3DMODE_DISABLE:
-			TRACE("3D processing disabled\n");
-			/* this one is here only to eliminate annoying warning message */
-			DSOUND_RecalcVolPan (&dsb->volpan);
-			return;
 		case DS3DMODE_NORMAL:
 			TRACE("Normal 3D processing mode\n");
 			/* we need to calculate distance between buffer and listener*/
@@ -187,6 +182,11 @@ void DSOUND_Calc3DBuffer(IDirectSoundBufferImpl *dsb)
 			vDistance = dsb->ds3db_ds3db.vPosition;
 			flDistance = VectorMagnitude (&vDistance);
 			break;
+		default:
+			TRACE("3D processing disabled\n");
+			/* this one is here only to eliminate annoying warning message */
+			DSOUND_RecalcVolPan (&dsb->volpan);
+			return;
 	}
 	
 	if (flDistance > dsb->ds3db_ds3db.flMaxDistance)




More information about the wine-cvs mailing list