mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-21 01:12:32 +08:00
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'
This commit is contained in:
parent
fb0cc53ef6
commit
15f3c2de23
@ -1,3 +1,8 @@
|
||||
2010-03-30 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sim-trace.c (trace_option_handler): Move cpu_nr decl behind
|
||||
the SIM_HAVE_ADDR_RANGE define.
|
||||
|
||||
2010-03-30 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sim-core.h (device_error): Add const to message, and add printf
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user