Remove unused variables.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5480 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Soren Jorvang 2010-05-26 20:43:16 +00:00
parent 619dc12349
commit 57a22f670f
8 changed files with 42 additions and 36 deletions

View File

@ -207,7 +207,6 @@ bool CWII_IPC_HLE_Device_es::IOCtlV(u32 _CommandAddress)
_dbg_assert_msg_(WII_IPC_ES, Buffer.NumberPayloadBuffer == 1, "IOCTL_ES_GETTITLECONTENTS bad out buffer");
u64 TitleID = Memory::Read_U64(Buffer.InBuffer[0].m_Address);
u32 MaxSize = Memory::Read_U32(Buffer.InBuffer[1].m_Address); // unused?
const DiscIO::INANDContentLoader& rNANDCOntent = AccessContentDevice(TitleID);
if (rNANDCOntent.IsValid()) // Not sure if dolphin will ever fail this check
@ -236,7 +235,6 @@ bool CWII_IPC_HLE_Device_es::IOCtlV(u32 _CommandAddress)
_dbg_assert_(WII_IPC_ES, Buffer.NumberPayloadBuffer == 0);
u64 TitleID = Memory::Read_U64(Buffer.InBuffer[0].m_Address);
u8* pTicket = Memory::GetPointer(Buffer.InBuffer[1].m_Address);
u32 Index = Memory::Read_U32(Buffer.InBuffer[2].m_Address);
u32 CFD = AccessIdentID++;
@ -369,7 +367,6 @@ bool CWII_IPC_HLE_Device_es::IOCtlV(u32 _CommandAddress)
u64 TitleID = Memory::Read_U64(Buffer.InBuffer[0].m_Address);
char* pTitleID = (char*)&TitleID;
char* Path = (char*)Memory::GetPointer(Buffer.PayloadBuffer[0].m_Address);
sprintf(Path, "/%08x/%08x/data", (u32)(TitleID >> 32), (u32)TitleID);
@ -480,7 +477,6 @@ bool CWII_IPC_HLE_Device_es::IOCtlV(u32 _CommandAddress)
_dbg_assert_msg_(WII_IPC_ES, Buffer.NumberPayloadBuffer == 1, "IOCTL_ES_GETVIEWS no out buffer");
u64 TitleID = Memory::Read_U64(Buffer.InBuffer[0].m_Address);
u32 Count = Memory::Read_U32(Buffer.InBuffer[1].m_Address);
std::string TicketFilename = CreateTicketFileName(TitleID);
if (File::Exists(TicketFilename.c_str()))
@ -552,8 +548,6 @@ bool CWII_IPC_HLE_Device_es::IOCtlV(u32 _CommandAddress)
INFO_LOG(WII_IPC_ES, "IOCTL_ES_GETTMDVIEWCNT: title: %08x/%08x buffersize: %i", (u32)(TitleID >> 32), (u32)TitleID, MaxCount);
u32 Count = 0;
u8* p = Memory::GetPointer(Buffer.PayloadBuffer[0].m_Address);
if (Loader.IsValid())
{
u32 Address = Buffer.PayloadBuffer[0].m_Address;
@ -601,7 +595,6 @@ bool CWII_IPC_HLE_Device_es::IOCtlV(u32 _CommandAddress)
INFO_LOG(WII_IPC_ES, "IOCTL_ES_GETSTOREDTMD: title: %08x/%08x buffersize: %i", (u32)(TitleID >> 32), (u32)TitleID, MaxCount);
u32 Count = 0;
if (Loader.IsValid())
{
u32 Address = Buffer.PayloadBuffer[0].m_Address;
@ -786,7 +779,6 @@ void CWII_IPC_HLE_Device_es::FindValidTitleIDs()
sprintf(TitlePath, "%stitle", File::GetUserPath(D_WIIUSER_IDX));
File::FSTEntry ParentEntry;
u32 NumEntries = ScanDirectoryTree(TitlePath, ParentEntry);
for(std::vector<File::FSTEntry>::iterator Level1 = ParentEntry.children.begin(); Level1 != ParentEntry.children.end(); ++Level1)
{
if (Level1->isDirectory)

View File

@ -71,11 +71,7 @@ bool CWII_IPC_HLE_Device_usb_kbd::Write(u32 _CommandAddress)
bool CWII_IPC_HLE_Device_usb_kbd::IOCtl(u32 _CommandAddress)
{
u32 Parameter = Memory::Read_U32(_CommandAddress + 0x0C);
u32 BufferIn = Memory::Read_U32(_CommandAddress + 0x10);
u32 BufferInSize = Memory::Read_U32(_CommandAddress + 0x14);
u32 BufferOut = Memory::Read_U32(_CommandAddress + 0x18);
u32 BufferOutSize = Memory::Read_U32(_CommandAddress + 0x1C);
if (SConfig::GetInstance().m_WiiKeyboard && !m_MessageQueue.empty())
{

View File

@ -258,7 +258,11 @@ void CWII_IPC_HLE_WiiMote::ExecuteL2capCmd(u8* _pData, u32 _Size)
_dbg_assert_msg_(WII_IPC_WIIMOTE, DoesChannelExist(pHeader->CID), "L2CAP: SendACLPacket to unknown channel %i", pHeader->CID);
CChannelMap::iterator itr= m_Channel.find(pHeader->CID);
#if defined(HAVE_WX) && HAVE_WX
const int number = NetPlay_GetWiimoteNum(m_ConnectionHandle & 0xFF);
#else
const int number = 0;
#endif
Common::PluginWiimote* mote = CPluginManager::GetInstance().GetWiimote(0);
if (itr != m_Channel.end())
@ -706,7 +710,11 @@ int ParseAttribList(u8* pAttribIDList, u16& _startID, u16& _endID)
u8 seqSize = attribList.Read8(attribOffset); attribOffset++;
u8 typeID = attribList.Read8(attribOffset); attribOffset++;
#if MAX_LOGLEVEL >= DEBUG_LEVEL
_dbg_assert_(WII_IPC_WIIMOTE, sequence == SDP_SEQ8);
#else
(void)sequence, (void)seqSize;
#endif
if (typeID == SDP_UINT32)
{
@ -778,10 +786,8 @@ void CWII_IPC_HLE_WiiMote::HandleSDP(u16 cid, u8* _pData, u32 _Size)
_dbg_assert_(WII_IPC_WIIMOTE, _Size == 13);
u16 TransactionID = buffer.Read16(1);
u16 ParameterLength = buffer.Read16(3);
u8* pServiceSearchPattern = buffer.GetPointer(5);
u16 MaximumServiceRecordCount = buffer.Read16(10);
u8 ContinuationState = buffer.Read8(12);
SDPSendServiceSearchResponse(cid, TransactionID, pServiceSearchPattern, MaximumServiceRecordCount);
}
@ -795,10 +801,14 @@ void CWII_IPC_HLE_WiiMote::HandleSDP(u16 cid, u8* _pData, u32 _Size)
u16 startAttrID, endAttrID;
u32 offset = 1;
u16 TransactionID = buffer.Read16(offset); offset += 2;
u16 ParameterLength = buffer.Read16(offset); offset += 2;
u32 ServiceHandle = buffer.Read32(offset); offset += 4;
u16 MaximumAttributeByteCount = buffer.Read16(offset); offset += 2;
u16 TransactionID = buffer.Read16(offset);
offset += 2;
// u16 ParameterLength = buffer.Read16(offset);
offset += 2;
u32 ServiceHandle = buffer.Read32(offset);
offset += 4;
u16 MaximumAttributeByteCount = buffer.Read16(offset);
offset += 2;
offset += ParseAttribList(buffer.GetPointer(offset), startAttrID, endAttrID);
u8* pContinuationState = buffer.GetPointer(offset);
@ -858,8 +868,10 @@ void CWII_IPC_HLE_WiiMote::SendCommandToACL(u8 _Ident, u8 _Code, u8 _CommandLeng
// ---------------------------------------------------
void CWII_IPC_HLE_WiiMote::ReceiveL2capData(u16 scid, const void* _pData, u32 _Size)
{
#if defined(HAVE_WX) && HAVE_WX
if (NetPlay_WiimoteInput(m_ConnectionHandle & 0xFF, scid, _pData, _Size))
return;
#endif
// Allocate DataFrame
u8 DataFrame[1024];

View File

@ -744,8 +744,6 @@ static void toCStringConverter(lua_State* L, int i, char*& ptr, int& remaining)
if(remaining <= 0)
return;
const char* str = ptr; // for debugging
// if there is a __tostring metamethod then call it
int usedMeta = luaL_callmeta(L, i, "__tostring");
if(usedMeta)
@ -811,7 +809,7 @@ defcase:default: APPENDPRINT "%s:%p",luaL_typename(L,i),lua_topointer(L,i) END b
if(foundCycleIter != s_tableAddressStack.end())
{
if((s_tableAddressStack.end() - foundCycleIter) > 1)
APPENDPRINT "%s:parent^%d",luaL_typename(L,i),(s_tableAddressStack.end() - foundCycleIter) END
APPENDPRINT "%s:parent^%d",luaL_typename(L,i),(int)(s_tableAddressStack.end() - foundCycleIter) END
else
APPENDPRINT "%s:parent",luaL_typename(L,i) END
}
@ -819,6 +817,7 @@ defcase:default: APPENDPRINT "%s:%p",luaL_typename(L,i),lua_topointer(L,i) END b
{
s_tableAddressStack.push_back(lua_topointer(L,i));
struct Scope { ~Scope(){ s_tableAddressStack.pop_back(); } } scope;
(void)scope;
APPENDPRINT "{" END
@ -1712,6 +1711,7 @@ DEFINE_LUA_FUNCTION(state_save, "location[,option]")
g_onlyCallSavestateCallbacks = true;
}
struct Scope { ~Scope(){ g_disableStatestateWarnings = false; g_onlyCallSavestateCallbacks = false; } } scope; // needs to run even if the following code throws an exception... maybe I should have put this in a "finally" block instead, but this project seems to have something against using the "try" statement
(void)scope;
if(!g_onlyCallSavestateCallbacks && FailVerifyAtFrameBoundary(L, "savestate.save", 2,2))
return 0;
@ -1758,6 +1758,7 @@ DEFINE_LUA_FUNCTION(state_load, "location[,option]")
g_onlyCallSavestateCallbacks = true;
}
struct Scope { ~Scope(){ g_disableStatestateWarnings = false; g_onlyCallSavestateCallbacks = false; } } scope; // needs to run even if the following code throws an exception... maybe I should have put this in a "finally" block instead, but this project seems to have something against using the "try" statement
(void)scope;
if(!g_onlyCallSavestateCallbacks && FailVerifyAtFrameBoundary(L, "savestate.load", 2,2))
return 0;
@ -1852,7 +1853,8 @@ DEFINE_LUA_FUNCTION(state_loadscriptdata, "location")
default:
{
// TODO
int stateNumber = (int)luaL_checkinteger(L,1);
// int stateNumber = (int)luaL_checkinteger(L,1);
//Set_Current_State(stateNumber, false,false);
char Name [1024] = {0};
//Get_State_File_Name(Name);
@ -2178,7 +2180,6 @@ inline int getcolor_unmodified(lua_State *L, int idx, int defaultColor)
lua_pushnil(L); // first key
int keyIndex = lua_gettop(L);
int valueIndex = keyIndex + 1;
bool first = true;
while(lua_next(L, idx))
{
bool keyIsString = (lua_type(L, keyIndex) == LUA_TSTRING);
@ -3501,6 +3502,7 @@ void RunLuaScriptFile(int uid, const char* filenameCStr)
#ifdef USE_INFO_STACK
infoStack.insert(infoStack.begin(), &info);
struct Scope { ~Scope(){ infoStack.erase(infoStack.begin()); } } scope; // doing it like this makes sure that the info stack gets cleaned up even if an exception is thrown
(void)scope;
#endif
info.nextFilename = filenameCStr;
@ -3717,6 +3719,7 @@ void CallExitFunction(int uid)
#ifdef USE_INFO_STACK
infoStack.insert(infoStack.begin(), &info);
struct Scope { ~Scope(){ infoStack.erase(infoStack.begin()); } } scope;
(void)scope;
#endif
lua_settop(L, 0);
@ -3750,7 +3753,6 @@ void CallExitFunction(int uid)
{
const char* varName = info.persistVars[i].c_str();
lua_getfield(L, LUA_GLOBALSINDEX, varName);
int type = lua_type(L,-1);
unsigned int varNameCRC = crc32(0, (const unsigned char*)varName, (int)strlen(varName));
newExitData.SaveRecordPartial(uid, varNameCRC, -1);
lua_pop(L,1);
@ -3985,6 +3987,7 @@ static void CallRegisteredLuaMemHook_LuaMatch(unsigned int address, int size, un
#ifdef USE_INFO_STACK
infoStack.insert(infoStack.begin(), &info);
struct Scope { ~Scope(){ infoStack.erase(infoStack.begin()); } } scope;
(void)scope;
#endif
lua_settop(L, 0);
lua_getfield(L, LUA_REGISTRYINDEX, luaMemHookTypeStrings[hookType]);
@ -4054,6 +4057,7 @@ void CallRegisteredLuaFunctions(LuaCallID calltype)
#ifdef USE_INFO_STACK
infoStack.insert(infoStack.begin(), &info);
struct Scope { ~Scope(){ infoStack.erase(infoStack.begin()); } } scope;
(void)scope;
#endif
// handle deferred GUI function calls and disabling deferring when unnecessary
if(calltype == LUACALL_AFTEREMULATIONGUI || calltype == LUACALL_AFTEREMULATION)
@ -4103,6 +4107,7 @@ void CallRegisteredLuaSaveFunctions(int savestateNumber, LuaSaveData& saveData)
#ifdef USE_INFO_STACK
infoStack.insert(infoStack.begin(), &info);
struct Scope { ~Scope(){ infoStack.erase(infoStack.begin()); } } scope;
(void)scope;
#endif
lua_settop(L, 0);
@ -4148,6 +4153,7 @@ void CallRegisteredLuaLoadFunctions(int savestateNumber, const LuaSaveData& save
#ifdef USE_INFO_STACK
infoStack.insert(infoStack.begin(), &info);
struct Scope { ~Scope(){ infoStack.erase(infoStack.begin()); } } scope;
(void)scope;
#endif
lua_settop(L, 0);
@ -4373,6 +4379,7 @@ static void LuaStackToBinaryConverter(lua_State* L, int i, std::vector<unsigned
{
s_tableAddressStack.push_back(lua_topointer(L,i));
struct Scope { ~Scope(){ s_tableAddressStack.pop_back(); } } scope;
(void)scope;
bool wasnil = false;
int nilcount = 0;
@ -4453,7 +4460,7 @@ static void LuaStackToBinaryConverter(lua_State* L, int i, std::vector<unsigned
// complements LuaStackToBinaryConverter
void BinaryToLuaStackConverter(lua_State* L, const unsigned char*& data, unsigned int& remaining)
{
assert(s_dbg_dataSize - (data - s_dbg_dataStart) == remaining);
assert(s_dbg_dataSize - (data - s_dbg_dataStart) == (int)remaining);
unsigned char type = AdvanceByteStream<unsigned char>(data, remaining);

View File

@ -458,6 +458,9 @@ const u8* Jit64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc
//Analyze the block, collect all instructions it is made of (including inlining,
//if that is enabled), reorder instructions for optimal performance, and join joinable instructions.
u32 nextPC = PPCAnalyst::Flatten(em_address, &size, &js.st, &js.gpa, &js.fpa, code_buf, blockSize);
#ifndef JIT_SINGLESTEP
(void)nextPC;
#endif
PPCAnalyst::CodeOp *ops = code_buf->codebuffer;

View File

@ -107,7 +107,7 @@ bool WiiWAD::ParseWAD(DiscIO::IBlobReader& _rReader)
return false;
m_CertificateChainSize = ReaderBig.Read32(0x8);
u32 Reserved = ReaderBig.Read32(0xC);
// u32 Reserved = ReaderBig.Read32(0xC);
m_TicketSize = ReaderBig.Read32(0x10);
m_TMDSize = ReaderBig.Read32(0x14);
m_DataAppSize = ReaderBig.Read32(0x18);

View File

@ -37,8 +37,6 @@ std::map<std::string, std::string> textureMap;
void Init(const char *gameCode)
{
static bool bCheckedDir;
CFileSearch::XStringVector Directories;
//Directories.push_back(std::string(File::GetUserPath(D_HIRESTEXTURES_IDX)));
char szDir[MAX_PATH];

View File

@ -131,8 +131,6 @@ inline void Draw(s32 x, s32 y, s32 xi, s32 yi)
RasterBlockPixel& pixel = rasterBlock.Pixel[xi][yi];
float invW = pixel.InvW;
tev.Position[0] = x;
tev.Position[1] = y;
tev.Position[2] = z;