From 9506d46df4d791d96c9fa8a71cff64a4a5a87ac2 Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Thu, 14 Aug 2008 21:51:09 +0000 Subject: [PATCH] Avoid compile warnings if logging is off. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@210 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Core/Src/HW/DVDInterface.cpp | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/Source/Core/Core/Src/HW/DVDInterface.cpp b/Source/Core/Core/Src/HW/DVDInterface.cpp index 0fba2da22c..f03d1c646c 100644 --- a/Source/Core/Core/Src/HW/DVDInterface.cpp +++ b/Source/Core/Core/Src/HW/DVDInterface.cpp @@ -416,10 +416,12 @@ void ExecuteCommand(UDIDMAControlRegister& _DMAControlReg) //========================================================================================================= case 0x12: { +#ifdef LOGGING u32 offset = dvdMem.Command[1]; // u32 sourcelength = dvdMem.Command[2]; +#endif u32 destbuffer = dvdMem.DMAAddress.Address; - u32 destlength = dvdMem.DMALength.Length; + u32 destlength = dvdMem.DMALength.Length; dvdMem.DMALength.Length = 0; LOG(DVDINTERFACE, "[WARNING] DVD: Get drive info offset=%08x, destbuffer=%08x, destlength=%08x", offset * 4, destbuffer, destlength); @@ -444,7 +446,8 @@ void ExecuteCommand(UDIDMAControlRegister& _DMAControlReg) if (g_bDiscInside) { u32 iDVDOffset = dvdMem.Command[1] << 2; - u32 iSrcLength = dvdMem.Command[2]; + u32 iSrcLength = dvdMem.Command[2]; + if (false) { iSrcLength++; } // avoid warning LOG(DVDINTERFACE, "DVD: Read ISO: DVDOffset=%08x, DMABuffer=%08x, SrcLength=%08x, DMALength=%08x",iDVDOffset,dvdMem.DMAAddress.Address,iSrcLength,dvdMem.DMALength.Length); _dbg_assert_(DVDINTERFACE, iSrcLength == dvdMem.DMALength.Length); @@ -469,8 +472,10 @@ void ExecuteCommand(UDIDMAControlRegister& _DMAControlReg) // Command0 <- Position on DVD shr 2 //========================================================================================================= case 0xAB: - { - u32 offset = dvdMem.Command[1] << 2; + { +#ifdef LOGGING + u32 offset = dvdMem.Command[1] << 2; +#endif LOG(DVDINTERFACE, "DVD: Trying to seek: offset=%08x", offset); } break; @@ -500,8 +505,10 @@ void ExecuteCommand(UDIDMAControlRegister& _DMAControlReg) // ugly hack to catch the disable command if (dvdMem.Command[1]!=0) - { - u8 subCommand = (dvdMem.Command[0] & 0x00FF0000) >> 16; + { +#ifdef LOGGING + u8 subCommand = (dvdMem.Command[0] & 0x00FF0000) >> 16; +#endif dvdMem.AudioPos = dvdMem.Command[1] << 2; dvdMem.AudioStart = dvdMem.AudioPos;