From a1002569a17ba8c8c89ac90ed0771dbdc774fcc8 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Wed, 6 May 2015 14:56:02 -0700 Subject: [PATCH] ISYS8010: Fix compiler warnings on Linux with gcc & clang --- Intel-Systems/common/i8080.c | 6 +++--- Intel-Systems/common/ieprom.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Intel-Systems/common/i8080.c b/Intel-Systems/common/i8080.c index 62577d9a..9ff06975 100644 --- a/Intel-Systems/common/i8080.c +++ b/Intel-Systems/common/i8080.c @@ -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); } diff --git a/Intel-Systems/common/ieprom.c b/Intel-Systems/common/ieprom.c index 53a7d734..3d0b5e27 100644 --- a/Intel-Systems/common/ieprom.c +++ b/Intel-Systems/common/ieprom.c @@ -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);