From fa501e9d8dded21d4654f173ea17ade6a1301f55 Mon Sep 17 00:00:00 2001 From: Rohit Nirmal Date: Fri, 5 Dec 2014 20:25:00 -0600 Subject: [PATCH] Fix -Wshadow warning. --- Source/Core/Core/HW/MemmapFunctions.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/Core/Core/HW/MemmapFunctions.cpp b/Source/Core/Core/HW/MemmapFunctions.cpp index 059019bbe6..810a45a00d 100644 --- a/Source/Core/Core/HW/MemmapFunctions.cpp +++ b/Source/Core/Core/HW/MemmapFunctions.cpp @@ -811,7 +811,7 @@ static u32 TranslatePageAddress(const u32 _Address, const XCheckTLBFlag _Flag) // Direct access to the fastmem Arena // FIXME: is this the best idea for clean code? - u8* base = Memory::base; + u8* base_mem = Memory::base; // hash function no 1 "xor" .360 u32 hash = (VSID ^ page_index); @@ -827,11 +827,11 @@ static u32 TranslatePageAddress(const u32 _Address, const XCheckTLBFlag _Flag) u32 pteg_addr = ((hash & PowerPC::ppcState.pagetable_hashmask) << 6) | PowerPC::ppcState.pagetable_base; if ((pteg_addr >> 28) == 1) - base = Memory::m_pEXRAM; + base_mem = Memory::m_pEXRAM; for (int i = 0; i < 8; i++) { - u32 pte = bswap(*(u32*)&base[pteg_addr]); + u32 pte = bswap(*(u32*)&base_mem[pteg_addr]); bool pteh = (pte & PTE1_H) == 0; if (hash_func == 1) @@ -842,7 +842,7 @@ static u32 TranslatePageAddress(const u32 _Address, const XCheckTLBFlag _Flag) if (VSID == PTE1_VSID(pte) && (api == PTE1_API(pte))) { UPTE2 PTE2; - PTE2.Hex = bswap((*(u32*)&base[(pteg_addr + 4)])); + PTE2.Hex = bswap((*(u32*)&base_mem[(pteg_addr + 4)])); // set the access bits switch (_Flag) @@ -854,7 +854,7 @@ static u32 TranslatePageAddress(const u32 _Address, const XCheckTLBFlag _Flag) } if (_Flag != FLAG_NO_EXCEPTION) - *(u32*)&base[(pteg_addr + 4)] = bswap(PTE2.Hex); + *(u32*)&base_mem[(pteg_addr + 4)] = bswap(PTE2.Hex); UpdateTLBEntry(_Flag, PTE2, _Address);