diff options
author | Mike Frysinger <vapier@gentoo.org> | 2023-12-15 22:19:25 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2023-12-19 05:51:10 -0500 |
commit | c6ce030ba9cbe741053426c4b03b33c0785d6b41 (patch) | |
tree | a705181774b330c6e75a95ad1f7b4a591b868093 /sim | |
parent | 1857c9f587a93d715de815af4a76bb6f6b17810a (diff) | |
download | gdb-c6ce030ba9cbe741053426c4b03b33c0785d6b41.zip gdb-c6ce030ba9cbe741053426c4b03b33c0785d6b41.tar.gz gdb-c6ce030ba9cbe741053426c4b03b33c0785d6b41.tar.bz2 |
sim: erc32: fix -Wunused-variable warnings
Diffstat (limited to 'sim')
-rw-r--r-- | sim/erc32/erc32.c | 3 | ||||
-rw-r--r-- | sim/erc32/func.c | 2 | ||||
-rw-r--r-- | sim/erc32/interf.c | 4 |
3 files changed, 4 insertions, 5 deletions
diff --git a/sim/erc32/erc32.c b/sim/erc32/erc32.c index 32c45bd..c4abab2 100644 --- a/sim/erc32/erc32.c +++ b/sim/erc32/erc32.c @@ -1632,10 +1632,7 @@ memory_read(int32_t asi, uint32_t addr, void *data, int32_t sz, int32_t *ws) int memory_write(int32_t asi, uint32_t addr, uint32_t *data, int32_t sz, int32_t *ws) { - uint32_t byte_addr; - uint32_t byte_mask; uint32_t waddr; - uint32_t *ram; int32_t mexc; int i; int wphit[2]; diff --git a/sim/erc32/func.c b/sim/erc32/func.c index f1b230a..3d1296b 100644 --- a/sim/erc32/func.c +++ b/sim/erc32/func.c @@ -614,7 +614,9 @@ reset_stat(struct pstate *sregs) void show_stat(struct pstate *sregs) { +#ifdef STAT uint32_t iinst; +#endif uint32_t stime; if (sregs->tottime == 0.0) diff --git a/sim/erc32/interf.c b/sim/erc32/interf.c index b487c7c..79f0147 100644 --- a/sim/erc32/interf.c +++ b/sim/erc32/interf.c @@ -332,7 +332,7 @@ sim_fetch_register(SIM_DESC sd, int regno, void *buf, int length) uint64_t sim_write (SIM_DESC sd, uint64_t mem, const void *buffer, uint64_t length) { - int i, len; + int i; const unsigned char *data = buffer; for (i = 0; i < length; i++) { @@ -344,7 +344,7 @@ sim_write (SIM_DESC sd, uint64_t mem, const void *buffer, uint64_t length) uint64_t sim_read (SIM_DESC sd, uint64_t mem, void *buffer, uint64_t length) { - int i, len; + int i; unsigned char *data = buffer; for (i = 0; i < length; i++) { |