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/sim/arguments.hh | 4 ++-- src/sim/clocked_object.hh | 4 ++-- src/sim/process.cc | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/sim') diff --git a/src/sim/arguments.hh b/src/sim/arguments.hh index f28f6635a..fad955999 100644 --- a/src/sim/arguments.hh +++ b/src/sim/arguments.hh @@ -130,8 +130,8 @@ class Arguments template operator T() { assert(sizeof(T) <= sizeof(uint64_t)); - T data = static_cast(getArg(sizeof(T))); - return data; + T d = static_cast(getArg(sizeof(T))); + return d; } template diff --git a/src/sim/clocked_object.hh b/src/sim/clocked_object.hh index e04e9338d..bf132bee1 100644 --- a/src/sim/clocked_object.hh +++ b/src/sim/clocked_object.hh @@ -184,8 +184,8 @@ class ClockedObject : public SimObject inline Tick clockPeriod() const { return clock; } - inline Cycles ticksToCycles(Tick tick) const - { return Cycles(tick / clock); } + inline Cycles ticksToCycles(Tick t) const + { return Cycles(t / clock); } }; diff --git a/src/sim/process.cc b/src/sim/process.cc index 08636b2c4..9921ef0b7 100644 --- a/src/sim/process.cc +++ b/src/sim/process.cc @@ -167,7 +167,7 @@ Process::Process(ProcessParams * params) // mark remaining fds as free for (int i = 3; i <= MAX_FD; ++i) { - Process::FdMap *fdo = &fd_map[i]; + fdo = &fd_map[i]; fdo->fd = -1; } -- cgit v1.2.3