sim: erc32: fix -Wunused-but-set-variable warnings

This commit is contained in:
Mike Frysinger 2023-12-06 20:07:11 -07:00
parent a886474a62
commit 89d7fc2ab0
2 changed files with 4 additions and 15 deletions

View File

@ -1042,10 +1042,6 @@ port_init(void)
static uint32_t
read_uart(uint32_t addr)
{
unsigned tmp;
tmp = 0;
switch (addr & 0xff) {
case 0xE0: /* UART 1 */
@ -1071,7 +1067,7 @@ read_uart(uint32_t addr)
}
#else
tmp = uarta_data;
unsigned tmp = uarta_data;
uarta_data &= ~UART_DR;
uart_stat_reg &= ~UARTA_DR;
return tmp;
@ -1103,7 +1099,7 @@ read_uart(uint32_t addr)
}
#else
tmp = uartb_data;
unsigned tmp = uartb_data;
uartb_data &= ~UART_DR;
uart_stat_reg &= ~UARTB_DR;
return tmp;

View File

@ -687,11 +687,8 @@ int_handler(int32_t sig)
void
init_signals(void)
{
typedef void (*PFI) ();
static PFI int_tab[2];
int_tab[0] = signal(SIGTERM, int_handler);
int_tab[1] = signal(SIGINT, int_handler);
signal(SIGTERM, int_handler);
signal(SIGINT, int_handler);
}
@ -706,7 +703,6 @@ disp_fpu(struct pstate *sregs)
{
int i;
float t;
printf("\n fsr: %08X\n\n", sregs->fsr);
@ -716,7 +712,6 @@ disp_fpu(struct pstate *sregs)
#endif
for (i = 0; i < 32; i++) {
t = sregs->fs[i];
printf(" f%02d %08x %14e ", i, sregs->fsi[i], sregs->fs[i]);
if (!(i & 1))
printf("%14e\n", sregs->fd[i >> 1]);
@ -1006,7 +1001,6 @@ bfd_load (const char *fname)
{
asection *section;
bfd *pbfd;
const bfd_arch_info_type *arch;
int i;
pbfd = bfd_openr(fname, 0);
@ -1020,7 +1014,6 @@ bfd_load (const char *fname)
return -1;
}
arch = bfd_get_arch_info (pbfd);
if (sis_verbose)
printf("loading %s:", fname);
for (section = pbfd->sections; section; section = section->next) {