aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sim/common/cgen-run.c3
-rw-r--r--sim/common/cgen-scache.c12
-rw-r--r--sim/common/sim-module.c2
-rw-r--r--sim/common/sim-options.c1
-rw-r--r--sim/common/sim-watch.c2
-rw-r--r--sim/common/syscall.c4
6 files changed, 10 insertions, 14 deletions
diff --git a/sim/common/cgen-run.c b/sim/common/cgen-run.c
index 29578b0..b0b7cf1 100644
--- a/sim/common/cgen-run.c
+++ b/sim/common/cgen-run.c
@@ -56,8 +56,7 @@ static void engine_run_n (SIM_DESC, int, int, int, int);
static int
cgen_get_fast_p (SIM_DESC sd)
{
- int i, c;
- int run_fast_p = 1;
+ int c;
for (c = 0; c < MAX_NR_PROCESSORS; ++c)
{
diff --git a/sim/common/cgen-scache.c b/sim/common/cgen-scache.c
index c6de30e..46dada7 100644
--- a/sim/common/cgen-scache.c
+++ b/sim/common/cgen-scache.c
@@ -276,7 +276,10 @@ scache_flush (SIM_DESC sd)
void
scache_flush_cpu (SIM_CPU *cpu)
{
- int i,n;
+ int i;
+#if WITH_SCACHE_PBB
+ int n;
+#endif
/* Don't bother if cache not in use. */
if (CPU_SCACHE_SIZE (cpu) == 0)
@@ -426,9 +429,6 @@ scache_print_profile (SIM_CPU *cpu, bool verbose)
unsigned long hits = CPU_SCACHE_HITS (cpu);
unsigned long misses = CPU_SCACHE_MISSES (cpu);
char buf[20];
- unsigned long max_val;
- unsigned long *lengths;
- int i;
if (CPU_SCACHE_SIZE (cpu) == 0)
return;
@@ -460,6 +460,10 @@ scache_print_profile (SIM_CPU *cpu, bool verbose)
if (verbose)
{
+ unsigned long max_val;
+ unsigned long *lengths;
+ int i;
+
sim_io_printf (sd, " Insn chain lengths:\n\n");
max_val = 0;
lengths = CPU_SCACHE_CHAIN_LENGTHS (cpu);
diff --git a/sim/common/sim-module.c b/sim/common/sim-module.c
index f03e4b7..ac8c978 100644
--- a/sim/common/sim-module.c
+++ b/sim/common/sim-module.c
@@ -133,8 +133,6 @@ sim_module_install_list (SIM_DESC sd, MODULE_INSTALL_FN * const *modules,
SIM_RC
sim_module_install (SIM_DESC sd)
{
- MODULE_INSTALL_FN * const *modp;
-
SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER);
SIM_ASSERT (STATE_MODULES (sd) == NULL);
diff --git a/sim/common/sim-options.c b/sim/common/sim-options.c
index a6cd003..9f23833 100644
--- a/sim/common/sim-options.c
+++ b/sim/common/sim-options.c
@@ -1078,7 +1078,6 @@ complete_option_list (char **ret, size_t *cnt, const struct option_list *ol,
const char *text, const char *word)
{
const OPTION *opt = NULL;
- int argi;
size_t len = strlen (word);
for ( ; ol != NULL; ol = ol->next)
diff --git a/sim/common/sim-watch.c b/sim/common/sim-watch.c
index 6f9a53a..3366257 100644
--- a/sim/common/sim-watch.c
+++ b/sim/common/sim-watch.c
@@ -169,8 +169,6 @@ static SIM_RC
schedule_watchpoint (SIM_DESC sd,
sim_watch_point *point)
{
- sim_watchpoints *watch = STATE_WATCHPOINTS (sd);
-
switch (point->type)
{
case pc_watchpoint:
diff --git a/sim/common/syscall.c b/sim/common/syscall.c
index 96033db..9d08730 100644
--- a/sim/common/syscall.c
+++ b/sim/common/syscall.c
@@ -213,9 +213,7 @@ cb_syscall (host_callback *cb, CB_SYSCALL *sc)
/* Buffer size. */
int bufsize = sc->arg2;
int written = 0;
- /* Q is the target address of where all the strings go. */
- TADDR q;
- int i, argc, envc, len, ret;
+ int argc, envc, len, ret;
char **argv = cb->argv;
char **envp = cb->envp;