summaryrefslogtreecommitdiff
path: root/src/kern/linux
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2013-02-19 05:56:06 -0500
committerAndreas Hansson <andreas.hansson@arm.com>2013-02-19 05:56:06 -0500
commitc10098f28be209e90277925e3f983b7e62d1d037 (patch)
tree0b9c9f562c030ae74ae0a5fea25f804fdb84cec0 /src/kern/linux
parent860155a5fc48f983e9af40c19bf8db8250709c26 (diff)
downloadgem5-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/kern/linux')
-rw-r--r--src/kern/linux/printk.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/kern/linux/printk.cc b/src/kern/linux/printk.cc
index e856e2263..7a4c551ce 100644
--- a/src/kern/linux/printk.cc
+++ b/src/kern/linux/printk.cc
@@ -186,17 +186,17 @@ Printk(stringstream &out, Arguments args)
case 'c': {
uint64_t mask = (*p == 'C') ? 0xffL : 0x7fL;
uint64_t num;
- int width;
+ int cwidth;
if (islong) {
num = (uint64_t)args;
- width = sizeof(uint64_t);
+ cwidth = sizeof(uint64_t);
} else {
num = (uint32_t)args;
- width = sizeof(uint32_t);
+ cwidth = sizeof(uint32_t);
}
- while (width-- > 0) {
+ while (cwidth-- > 0) {
char c = (char)(num & mask);
if (c)
out << c;