From c10098f28be209e90277925e3f983b7e62d1d037 Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Tue, 19 Feb 2013 05:56:06 -0500 Subject: scons: Fix up numerous warnings about name shadowing This patch address the most important name shadowing warnings (as produced when using gcc/clang with -Wshadow). There are many locations where constructor parameters and function parameters shadow local variables, but these are left unchanged. --- src/mem/ruby/system/System.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/mem/ruby/system') diff --git a/src/mem/ruby/system/System.cc b/src/mem/ruby/system/System.cc index ab441560c..f1a6a91b8 100644 --- a/src/mem/ruby/system/System.cc +++ b/src/mem/ruby/system/System.cc @@ -482,8 +482,8 @@ RubySystem::functionalRead(PacketPtr pkt) DPRINTF(RubySystem, "reading from %s block %s\n", m_abs_cntrl_vec[i]->name(), block); - for (unsigned i = 0; i < size_in_bytes; ++i) { - data[i] = block.getByte(i + startByte); + for (unsigned j = 0; j < size_in_bytes; ++j) { + data[j] = block.getByte(j + startByte); } return true; } @@ -507,8 +507,8 @@ RubySystem::functionalRead(PacketPtr pkt) DPRINTF(RubySystem, "reading from %s block %s\n", m_abs_cntrl_vec[i]->name(), block); - for (unsigned i = 0; i < size_in_bytes; ++i) { - data[i] = block.getByte(i + startByte); + for (unsigned j = 0; j < size_in_bytes; ++j) { + data[j] = block.getByte(j + startByte); } return true; } @@ -545,8 +545,8 @@ RubySystem::functionalWrite(PacketPtr pkt) DataBlock& block = m_abs_cntrl_vec[i]->getDataBlock(line_addr); DPRINTF(RubySystem, "%s\n",block); - for (unsigned i = 0; i < size_in_bytes; ++i) { - block.setByte(i + startByte, data[i]); + for (unsigned j = 0; j < size_in_bytes; ++j) { + block.setByte(j + startByte, data[j]); } DPRINTF(RubySystem, "%s\n",block); } -- cgit v1.2.3