ISYS8010: Fix compiler warnings on Linux with gcc & clang

This commit is contained in:
Mark Pizzolato 2015-05-06 14:56:02 -07:00
parent ce84886bfa
commit a1002569a1
2 changed files with 4 additions and 4 deletions

View file

@ -412,7 +412,7 @@ int32 sim_instr (void)
}
if (sim_interval <= 0) { /* check clock queue */
if (reason = sim_process_event())
if ((reason = sim_process_event()))
break;
}
sim_interval--; /* countdown clock */
@ -1329,7 +1329,7 @@ t_stat fprint_sym (FILE *of, t_addr addr, t_value *val,
if (strchr(opcode[inst], ' ') != NULL)
fprintf (of, ",");
else fprintf (of, " ");
fprintf (of, "%h", val[1]);
fprintf (of, "%02X", val[1]);
}
if (oplen[inst] == 3) {
adr = val[1] & 0xFF;
@ -1337,7 +1337,7 @@ t_stat fprint_sym (FILE *of, t_addr addr, t_value *val,
if (strchr(opcode[inst], ' ') != NULL)
fprintf (of, ",");
else fprintf (of, " ");
fprintf (of, "%h", adr);
fprintf (of, "%04X", adr);
}
return -(oplen[inst] - 1);
}

View file

@ -172,7 +172,7 @@ int32 EPROM_get_mbyte(uint32 addr)
if (i8255_unit.u5 & 0x01) { /* EPROM enabled */
sim_debug (DEBUG_read, &EPROM_dev, "EPROM_get_mbyte: addr=%04X\n", addr);
if ((addr >= 0) && (addr < EPROM_unit.capac)) {
if (addr < EPROM_unit.capac) {
SET_XACK(1); /* good memory address */
sim_debug (DEBUG_xack, &EPROM_dev, "EPROM_get_mbyte: Set XACK for %04X\n", addr);
val = *((uint8 *)EPROM_unit.filebuf + addr);