diff options
author | Marek Vasut <marek.vasut@gmail.com> | 2011-09-26 02:26:06 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2011-10-01 23:26:36 +0200 |
commit | f3b3c3df189f4d35c903c3472619017d0bd1baa7 (patch) | |
tree | 740831a3cd72c4df1cb9463b4e1381922f204810 /common/cmd_mem.c | |
parent | 564964bd8527667bf88a47890d73cac5eec16c55 (diff) | |
download | u-boot-imx-f3b3c3df189f4d35c903c3472619017d0bd1baa7.zip u-boot-imx-f3b3c3df189f4d35c903c3472619017d0bd1baa7.tar.gz u-boot-imx-f3b3c3df189f4d35c903c3472619017d0bd1baa7.tar.bz2 |
GCC4.6: Squash warning in cmd_mem.c
cmd_mem.c: In function ‘do_mem_loop’:
cmd_mem.c:474:25: warning: variable ‘junk’ set but not used
[-Wunused-but-set-variable]
The assigned variable can be removed because the pointers are volatile so
accesses to their addresses are always generated.
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Diffstat (limited to 'common/cmd_mem.c')
-rw-r--r-- | common/cmd_mem.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/common/cmd_mem.c b/common/cmd_mem.c index 4daa1b3..e84cc4e 100644 --- a/common/cmd_mem.c +++ b/common/cmd_mem.c @@ -471,7 +471,7 @@ int do_mem_base (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) int do_mem_loop (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { - ulong addr, length, i, junk; + ulong addr, length, i; int size; volatile uint *longp; volatile ushort *shortp; @@ -518,7 +518,7 @@ int do_mem_loop (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) longp = (uint *)addr; i = length; while (i-- > 0) - junk = *longp++; + *longp++; } } if (size == 2) { @@ -526,14 +526,14 @@ int do_mem_loop (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) shortp = (ushort *)addr; i = length; while (i-- > 0) - junk = *shortp++; + *shortp++; } } for (;;) { cp = (u_char *)addr; i = length; while (i-- > 0) - junk = *cp++; + *cp++; } } |