sim: erc32: fix -Wunused-variable warnings

This commit is contained in:
Mike Frysinger 2023-12-15 22:19:25 -05:00
parent 1857c9f587
commit c6ce030ba9
3 changed files with 4 additions and 5 deletions

View File

@ -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];

View File

@ -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)

View File

@ -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++) {