diff options
author | Mike Frysinger <vapier@gentoo.org> | 2010-03-30 20:39:38 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2010-03-30 20:39:38 +0000 |
commit | 15f3c2de23e579e8965294c24de2a0bb5971273b (patch) | |
tree | ef0f89f6d742740d12119c86354ffcfce3aa2d56 /sim/common/sim-trace.c | |
parent | fb0cc53ef61e1f7302f886a07fef53a908a1795d (diff) | |
download | binutils-15f3c2de23e579e8965294c24de2a0bb5971273b.zip binutils-15f3c2de23e579e8965294c24de2a0bb5971273b.tar.gz binutils-15f3c2de23e579e8965294c24de2a0bb5971273b.tar.bz2 |
sim: fix unused cpu_nr warnings
The trace_option_handler() function only uses cpu_nr when the
SIM_HAVE_ADDR_RANGE define is enabled. So move the decl down
to where the code exists. Otherwise GCC warns:
sim-trace.c: In function 'trace_option_handler':
sim-trace.c:236: warning: unused variable 'cpu_nr'
Diffstat (limited to 'sim/common/sim-trace.c')
-rw-r--r-- | sim/common/sim-trace.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sim/common/sim-trace.c b/sim/common/sim-trace.c index 9bb2458..478cbfa 100644 --- a/sim/common/sim-trace.c +++ b/sim/common/sim-trace.c @@ -233,7 +233,6 @@ trace_option_handler (SIM_DESC sd, sim_cpu *cpu, int opt, char *arg, int is_command) { int n; - int cpu_nr; switch (opt) { @@ -353,6 +352,7 @@ trace_option_handler (SIM_DESC sd, sim_cpu *cpu, int opt, case OPTION_TRACE_RANGE : if (WITH_TRACE) { + int cpu_nr; char *chp = arg; unsigned long start,end; start = strtoul (chp, &chp, 0); |