From 008052e6d6b4ad2559b8724a1a8dd832c4004754 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Mon, 12 Aug 2013 23:32:38 -0700 Subject: [PATCH] Fix some variable hiding warnings. --- Core/Dialog/PSPOskDialog.cpp | 18 +++++++++--------- Core/FileSystems/VirtualDiscFileSystem.cpp | 1 - Core/HLE/sceKernelEventFlag.cpp | 1 - Core/HLE/sceKernelMemory.cpp | 1 - Core/HLE/sceKernelMutex.cpp | 2 -- Core/HLE/sceKernelSemaphore.cpp | 1 - Core/HLE/scePsmf.cpp | 1 - GPU/GLES/TextureCache.cpp | 6 +++--- 8 files changed, 12 insertions(+), 19 deletions(-) diff --git a/Core/Dialog/PSPOskDialog.cpp b/Core/Dialog/PSPOskDialog.cpp index 4aec0d2fc0..3ec0bd14b7 100755 --- a/Core/Dialog/PSPOskDialog.cpp +++ b/Core/Dialog/PSPOskDialog.cpp @@ -401,8 +401,8 @@ std::wstring PSPOskDialog::CombinationKorean(bool isInput) } } } else { - int tmp = GetIndex(kor_vowel, sw); - if(tmp == -1) { + int tmp3 = GetIndex(kor_vowel, sw); + if (tmp3 == -1) { string += inputChars[i]; if (inputChars.size() < FieldMaxLength()) { string += sw; @@ -431,29 +431,29 @@ std::wstring PSPOskDialog::CombinationKorean(bool isInput) u16 code = 0xAC00 + i_value[0] * 0x24C + i_value[1] * 0x1C + kor_lconsSpr[tmp2 + 1]; string += code; - code = 0xAC00 + kor_lconsSpr[tmp2 + 2] * 0x24C + tmp * 0x1C; + code = 0xAC00 + kor_lconsSpr[tmp2 + 2] * 0x24C + tmp3 * 0x1C; string += code; if(isInput == true) { i_value[0] = kor_lconsSpr[tmp2 + 2]; - i_value[1] = tmp; + i_value[1] = tmp3; i_level = 2; } } else { - int tmp2 = GetIndex(kor_cons, kor_lcons[i_value[2]]); + int tmp4 = GetIndex(kor_cons, kor_lcons[i_value[2]]); - if(tmp2 != -1) { + if (tmp4 != -1) { u16 code = 0xAC00 + i_value[0] * 0x24C + i_value[1] * 0x1C; string += code; - code = 0xAC00 + tmp2 * 0x24C + tmp * 0x1C; + code = 0xAC00 + tmp4 * 0x24C + tmp3 * 0x1C; string += code; if(isInput == true) { - i_value[0] = tmp2; - i_value[1] = tmp; + i_value[0] = tmp4; + i_value[1] = tmp3; i_level = 2; } } else { diff --git a/Core/FileSystems/VirtualDiscFileSystem.cpp b/Core/FileSystems/VirtualDiscFileSystem.cpp index cc1c47e5df..9fd75229d9 100644 --- a/Core/FileSystems/VirtualDiscFileSystem.cpp +++ b/Core/FileSystems/VirtualDiscFileSystem.cpp @@ -558,7 +558,6 @@ PSPFileInfo VirtualDiscFileSystem::GetFileInfo(std::string filename) { x.size = File::GetSize(fullName); - int fileIndex = getFileListIndex(filename); x.startSector = fileList[fileIndex].firstBlock; x.numSectors = (x.size+2047)/2048; diff --git a/Core/HLE/sceKernelEventFlag.cpp b/Core/HLE/sceKernelEventFlag.cpp index 9c91ef8159..f5c5ddbc3c 100644 --- a/Core/HLE/sceKernelEventFlag.cpp +++ b/Core/HLE/sceKernelEventFlag.cpp @@ -664,7 +664,6 @@ u32 sceKernelReferEventFlagStatus(SceUID id, u32 statusPtr) if (!Memory::IsValidAddress(statusPtr)) return -1; - u32 error; for (auto iter = e->waitingThreads.begin(); iter != e->waitingThreads.end(); ++iter) { SceUID waitID = __KernelGetWaitID(iter->tid, WAITTYPE_EVENTFLAG, error); diff --git a/Core/HLE/sceKernelMemory.cpp b/Core/HLE/sceKernelMemory.cpp index 37b771a6c4..ca718f9bb1 100644 --- a/Core/HLE/sceKernelMemory.cpp +++ b/Core/HLE/sceKernelMemory.cpp @@ -1228,7 +1228,6 @@ int sceKernelReferVplStatus(SceUID uid, u32 infoPtr) { DEBUG_LOG(HLE, "sceKernelReferVplStatus(%i, %08x)", uid, infoPtr); - u32 error; for (auto iter = vpl->waitingThreads.begin(); iter != vpl->waitingThreads.end(); ++iter) { SceUID waitID = __KernelGetWaitID(iter->threadID, WAITTYPE_VPL, error); diff --git a/Core/HLE/sceKernelMutex.cpp b/Core/HLE/sceKernelMutex.cpp index ad1ee43dd5..7e901017e2 100644 --- a/Core/HLE/sceKernelMutex.cpp +++ b/Core/HLE/sceKernelMutex.cpp @@ -694,7 +694,6 @@ int sceKernelReferMutexStatus(SceUID id, u32 infoAddr) // Don't write if the size is 0. Anything else is A-OK, though, apparently. if (Memory::Read_U32(infoAddr) != 0) { - u32 error; for (auto iter = m->waitingThreads.begin(); iter != m->waitingThreads.end(); ++iter) { SceUID waitID = __KernelGetWaitID(*iter, WAITTYPE_MUTEX, error); @@ -1153,7 +1152,6 @@ int __KernelReferLwMutexStatus(SceUID uid, u32 infoPtr) { auto workarea = m->nm.workarea; - u32 error; for (auto iter = m->waitingThreads.begin(); iter != m->waitingThreads.end(); ++iter) { SceUID waitID = __KernelGetWaitID(*iter, WAITTYPE_LWMUTEX, error); diff --git a/Core/HLE/sceKernelSemaphore.cpp b/Core/HLE/sceKernelSemaphore.cpp index 7696c992cd..0fdaa1d078 100644 --- a/Core/HLE/sceKernelSemaphore.cpp +++ b/Core/HLE/sceKernelSemaphore.cpp @@ -333,7 +333,6 @@ int sceKernelReferSemaStatus(SceUID id, u32 infoPtr) if (!Memory::IsValidAddress(infoPtr)) return -1; - u32 error; for (auto iter = s->waitingThreads.begin(); iter != s->waitingThreads.end(); ++iter) { SceUID waitID = __KernelGetWaitID(*iter, WAITTYPE_SEMA, error); diff --git a/Core/HLE/scePsmf.cpp b/Core/HLE/scePsmf.cpp index 42df1871c0..915fd28356 100644 --- a/Core/HLE/scePsmf.cpp +++ b/Core/HLE/scePsmf.cpp @@ -28,7 +28,6 @@ #include // "Go Sudoku" is a good way to test this code... -const int size = 2048; const int PSMF_VIDEO_STREAM_ID = 0xE0; const int PSMF_AUDIO_STREAM_ID = 0xBD; const int PSMF_AVC_STREAM = 0; diff --git a/GPU/GLES/TextureCache.cpp b/GPU/GLES/TextureCache.cpp index 5234176d92..626c3dd825 100644 --- a/GPU/GLES/TextureCache.cpp +++ b/GPU/GLES/TextureCache.cpp @@ -271,9 +271,9 @@ void *TextureCache::UnswizzleFromMem(u32 texaddr, u32 bufw, u32 bytesPerPixel, u u32 ydest = 0; if (rowWidth >= 16) { const u32 *src = (u32 *) Memory::GetPointer(texaddr); - u32 *ydest = tmpTexBuf32.data(); + u32 *ydestp = tmpTexBuf32.data(); for (int by = 0; by < byc; by++) { - u32 *xdest = ydest; + u32 *xdest = ydestp; for (int bx = 0; bx < bxc; bx++) { u32 *dest = xdest; for (int n = 0; n < 8; n++) { @@ -283,7 +283,7 @@ void *TextureCache::UnswizzleFromMem(u32 texaddr, u32 bufw, u32 bytesPerPixel, u } xdest += 4; } - ydest += (rowWidth * 8) / 4; + ydestp += (rowWidth * 8) / 4; } } else if (rowWidth == 8) { const u32 *src = (u32 *) Memory::GetPointer(texaddr);