diff options
author | Andreas Hansson <andreas.hansson@arm.com> | 2013-02-19 05:56:06 -0500 |
---|---|---|
committer | Andreas Hansson <andreas.hansson@arm.com> | 2013-02-19 05:56:06 -0500 |
commit | c10098f28be209e90277925e3f983b7e62d1d037 (patch) | |
tree | 0b9c9f562c030ae74ae0a5fea25f804fdb84cec0 /src/mem | |
parent | 860155a5fc48f983e9af40c19bf8db8250709c26 (diff) | |
download | gem5-c10098f28be209e90277925e3f983b7e62d1d037.tar.xz |
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.
Diffstat (limited to 'src/mem')
-rw-r--r-- | src/mem/cache/cache_impl.hh | 6 | ||||
-rw-r--r-- | src/mem/cache/tags/fa_lru.cc | 6 | ||||
-rw-r--r-- | src/mem/ruby/network/orion/Crossbar/Crossbar.cc | 2 | ||||
-rw-r--r-- | src/mem/ruby/network/orion/OrionRouter.hh | 2 | ||||
-rw-r--r-- | src/mem/ruby/profiler/AddressProfiler.cc | 6 | ||||
-rw-r--r-- | src/mem/ruby/system/System.cc | 12 |
6 files changed, 17 insertions, 17 deletions
diff --git a/src/mem/cache/cache_impl.hh b/src/mem/cache/cache_impl.hh index b30132748..8f7938b93 100644 --- a/src/mem/cache/cache_impl.hh +++ b/src/mem/cache/cache_impl.hh @@ -319,8 +319,8 @@ Cache<TagStore>::access(PacketPtr pkt, BlkType *&blk, incMissCount(pkt); return false; } - int id = pkt->req->masterId(); - tags->insertBlock(pkt->getAddr(), blk, id); + int master_id = pkt->req->masterId(); + tags->insertBlock(pkt->getAddr(), blk, master_id); blk->status = BlkValid | BlkReadable; } std::memcpy(blk->data, pkt->getPtr<uint8_t>(), blkSize); @@ -1005,7 +1005,7 @@ Cache<TagStore>::recvTimingResp(PacketPtr pkt) if (blk) { blk->status &= ~BlkReadable; } - MSHRQueue *mq = mshr->queue; + mq = mshr->queue; mq->markPending(mshr); requestMemSideBus((RequestCause)mq->index, curTick() + pkt->busLastWordDelay); diff --git a/src/mem/cache/tags/fa_lru.cc b/src/mem/cache/tags/fa_lru.cc index 1a607dc80..efb8b89df 100644 --- a/src/mem/cache/tags/fa_lru.cc +++ b/src/mem/cache/tags/fa_lru.cc @@ -270,16 +270,16 @@ bool FALRU::check() { FALRUBlk* blk = head; - int size = 0; + int tot_size = 0; int boundary = 1<<17; int j = 0; int flags = cacheMask; while (blk) { - size += blkSize; + tot_size += blkSize; if (blk->inCache != flags) { return false; } - if (size == boundary && blk != tail) { + if (tot_size == boundary && blk != tail) { if (cacheBoundaries[j] != blk) { return false; } diff --git a/src/mem/ruby/network/orion/Crossbar/Crossbar.cc b/src/mem/ruby/network/orion/Crossbar/Crossbar.cc index 1ae699d55..5f0f2206d 100644 --- a/src/mem/ruby/network/orion/Crossbar/Crossbar.cc +++ b/src/mem/ruby/network/orion/Crossbar/Crossbar.cc @@ -306,7 +306,7 @@ double Crossbar::calc_ctr_cap(double cap_wire_, bool prev_ctr_, bool next_ctr_) //FIXME Wmemcellr and resize double Wmemcellr = m_tech_param_ptr->get_Wmemcellr(); double nsize = Wmemcellr; - double trans_cap = m_tech_param_ptr->calc_gatecap(nsize, 0); + trans_cap = m_tech_param_ptr->calc_gatecap(nsize, 0); if (m_trans_type == NP_GATE) { double Wdecinvn = m_tech_param_ptr->get_Wdecinvn(); diff --git a/src/mem/ruby/network/orion/OrionRouter.hh b/src/mem/ruby/network/orion/OrionRouter.hh index 38f808aef..ac3d2e9e1 100644 --- a/src/mem/ruby/network/orion/OrionRouter.hh +++ b/src/mem/ruby/network/orion/OrionRouter.hh @@ -98,7 +98,7 @@ class OrionRouter uint32_t m_num_out_port; uint32_t m_flit_width; uint32_t m_num_vclass; - uint32_t num_vc_per_vclass_; + uint32_t num_vc_per_vclass; uint32_t m_total_num_vc; uint32_t* m_num_vc_per_vclass_ary; uint32_t* m_in_buf_num_set_ary; diff --git a/src/mem/ruby/profiler/AddressProfiler.cc b/src/mem/ruby/profiler/AddressProfiler.cc index a9c9a9591..0d5d135eb 100644 --- a/src/mem/ruby/profiler/AddressProfiler.cc +++ b/src/mem/ruby/profiler/AddressProfiler.cc @@ -100,9 +100,9 @@ printSorted(ostream& out, int num_of_sequencers, const AddressMap &record_map, std::vector<int64> m_touched_weighted_vec; m_touched_vec.resize(num_of_sequencers+1); m_touched_weighted_vec.resize(num_of_sequencers+1); - for (int i = 0; i < m_touched_vec.size(); i++) { - m_touched_vec[i] = 0; - m_touched_weighted_vec[i] = 0; + for (int j = 0; j < m_touched_vec.size(); j++) { + m_touched_vec[j] = 0; + m_touched_weighted_vec[j] = 0; } int counter = 0; 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); } |