IBMPC, IBMPCXT: Compiler suggested cleanup

This commit is contained in:
Bill Beech 2017-04-07 10:23:55 -07:00
parent d42dd707e9
commit 60bf7d5d12
4 changed files with 10 additions and 12 deletions

View file

@ -128,8 +128,6 @@ DEVICE i8253_dev = {
t_stat i8253_svc (UNIT *uptr)
{
int32 temp;
sim_activate (&i8253_unit[0], i8253_unit[0].wait); /* continue poll */
return SCPE_OK;
}

View file

@ -119,7 +119,7 @@ uint8 RAM_get_mbyte(uint32 addr)
uint8 val;
sim_debug (DEBUG_read, &RAM_dev, "RAM_get_mbyte: addr=%04X\n", addr);
if ((addr >= RAM_unit.u3) && ((uint32) addr < (RAM_unit.u3 + RAM_unit.capac))) {
if ((addr >= (uint32)RAM_unit.u3) && ( addr < (uint32)(RAM_unit.u3 + RAM_unit.capac))) {
val = *((uint8 *)RAM_unit.filebuf + (addr - RAM_unit.u3));
sim_debug (DEBUG_read, &RAM_dev, " val=%04X\n", val);
return (val & 0xFF);
@ -133,7 +133,7 @@ uint8 RAM_get_mbyte(uint32 addr)
void RAM_put_mbyte(uint32 addr, uint8 val)
{
sim_debug (DEBUG_write, &RAM_dev, "RAM_put_mbyte: addr=%04X, val=%02X\n", addr, val);
if ((addr >= RAM_unit.u3) && ((uint32)addr < RAM_unit.u3 + RAM_unit.capac)) {
if ((addr >= (uint32)RAM_unit.u3) && (addr < (uint32)(RAM_unit.u3 + RAM_unit.capac))) {
*((uint8 *)RAM_unit.filebuf + (addr - RAM_unit.u3)) = val & 0xFF;
sim_debug (DEBUG_write, &RAM_dev, "\n");
return;

View file

@ -158,12 +158,12 @@ uint8 enbnmi(t_bool io, uint8 data)
uint8 get_mbyte(uint32 addr)
{
/* if local EPROM handle it */
if ((addr >= EPROM_unit.u3) && ((uint32)addr < (EPROM_unit.u3 + EPROM_unit.capac))) {
if ((addr >= (uint32)EPROM_unit.u3) && (addr < (uint32)(EPROM_unit.u3 + EPROM_unit.capac))) {
// sim_printf("Write to R/O memory address %05X - ignored\n", addr);
return EPROM_get_mbyte(addr);
}
/* if local RAM handle it */
if ((addr >= RAM_unit.u3) && ((uint32)addr < (RAM_unit.u3 + RAM_unit.capac))) {
if ((addr >= (uint32)RAM_unit.u3) && (addr < (uint32)(RAM_unit.u3 + RAM_unit.capac))) {
return RAM_get_mbyte(addr);
}
/* otherwise, try the pcbus */
@ -186,11 +186,11 @@ uint16 get_mword(uint32 addr)
void put_mbyte(uint32 addr, uint8 val)
{
/* if local EPROM handle it */
if ((addr >= EPROM_unit.u3) && ((uint32)addr <= (EPROM_unit.u3 + EPROM_unit.capac))) {
if ((addr >= (uint32)EPROM_unit.u3) && (addr <= (uint32)(EPROM_unit.u3 + EPROM_unit.capac))) {
sim_printf("Write to R/O memory address %04X - ignored\n", addr);
return;
} /* if local RAM handle it */
if ((addr >= RAM_unit.u3) && ((uint32)addr <= (RAM_unit.u3 + RAM_unit.capac))) {
if ((addr >= (uint32)RAM_unit.u3) && (addr <= (uint32)(RAM_unit.u3 + RAM_unit.capac))) {
RAM_put_mbyte(addr, val);
return;
} /* otherwise, try the pcbus */

View file

@ -158,11 +158,11 @@ uint8 enbnmi(t_bool io, uint8 data)
uint8 get_mbyte(uint32 addr)
{
/* if local EPROM handle it */
if ((addr >= EPROM_unit.u3) && ((uint32)addr < (EPROM_unit.u3 + EPROM_unit.capac))) {
if ((addr >= (uint32)EPROM_unit.u3) && (addr < (uint32)(EPROM_unit.u3 + EPROM_unit.capac))) {
return EPROM_get_mbyte(addr);
}
/* if local RAM handle it */
if ((addr >= RAM_unit.u3) && ((uint16)addr < (RAM_unit.u3 + RAM_unit.capac))) {
if ((addr >= (uint32)RAM_unit.u3) && (addr < (uint32)(RAM_unit.u3 + RAM_unit.capac))) {
return RAM_get_mbyte(addr);
}
/* otherwise, try the multibus */
@ -185,11 +185,11 @@ uint16 get_mword(uint32 addr)
void put_mbyte(uint32 addr, uint8 val)
{
/* if local EPROM handle it */
if ((addr >= EPROM_unit.u3) && ((uint32)addr <= (EPROM_unit.u3 + EPROM_unit.capac))) {
if ((addr >= (uint32)EPROM_unit.u3) && (addr <= (uint32)(EPROM_unit.u3 + EPROM_unit.capac))) {
sim_printf("Write to R/O memory address %05X - ignored\n", addr);
return;
} /* if local RAM handle it */
if ((i8255_unit[0].u5 & 0x02) && (addr >= RAM_unit.u3) && ((uint16)addr <= (RAM_unit.u3 + RAM_unit.capac))) {
if ((i8255_unit[0].u5 & 0x02) && (addr >= (uint32)RAM_unit.u3) && (addr <= (uint32)(RAM_unit.u3 + RAM_unit.capac))) {
RAM_put_mbyte(addr, val);
return;
} /* otherwise, try the multibus */