[PATCH 2/2 (try2)] dsound: Handle default case in dsound3d mode switch (Coverity).

Andrew Eikum aeikum at codeweavers.com
Wed Feb 10 12:54:15 CST 2016


Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>

---

CID 1270009
---
 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)
-- 
2.7.1





More information about the wine-patches mailing list