diff --git a/NOVA/nova_cpu.c b/NOVA/nova_cpu.c index ab2fc108..efd30f62 100644 --- a/NOVA/nova_cpu.c +++ b/NOVA/nova_cpu.c @@ -1244,7 +1244,7 @@ static const int32 boot_rom[] = { t_stat cpu_boot (int32 unitno, DEVICE *dptr) { -int32 i; +size_t i; for (i = 0; i < BOOT_LEN; i++) M[BOOT_START + i] = boot_rom[i]; saved_PC = BOOT_START; diff --git a/NOVA/nova_dkp.c b/NOVA/nova_dkp.c index f5126f28..cc1f1ead 100644 --- a/NOVA/nova_dkp.c +++ b/NOVA/nova_dkp.c @@ -1085,7 +1085,7 @@ static const int32 boot_rom[] = { t_stat dkp_boot (int32 unitno, DEVICE *dptr) { -int32 i; +size_t i; for (i = 0; i < BOOT_LEN; i++) M[BOOT_START + i] = (uint16) boot_rom[i]; diff --git a/NOVA/nova_dsk.c b/NOVA/nova_dsk.c index b1cfff3e..1c204bb7 100644 --- a/NOVA/nova_dsk.c +++ b/NOVA/nova_dsk.c @@ -297,7 +297,7 @@ static const int32 boot_rom[] = { t_stat dsk_boot (int32 unitno, DEVICE *dptr) { -int32 i; +size_t i; for (i = 0; i < BOOT_LEN; i++) M[BOOT_START + i] = (uint16) boot_rom[i]; saved_PC = BOOT_START; diff --git a/PDP8/pdp8_ct.c b/PDP8/pdp8_ct.c index 45289576..735da73b 100644 --- a/PDP8/pdp8_ct.c +++ b/PDP8/pdp8_ct.c @@ -717,7 +717,7 @@ static const uint16 boot_rom[] = { t_stat ct_boot (int32 unitno, DEVICE *dptr) { -int32 i; +size_t i; extern int32 saved_PC; extern uint16 M[]; diff --git a/VAX/vax860_stddev.c b/VAX/vax860_stddev.c index 45adc1f9..36480259 100644 --- a/VAX/vax860_stddev.c +++ b/VAX/vax860_stddev.c @@ -1019,6 +1019,8 @@ switch (rlcs_state) { if (sim_fseek (uptr->fileref, da, SEEK_SET)) return SCPE_IOERR; bcnt = sim_fread (rlcs_buf, sizeof (int16), RL_NUMBY, uptr->fileref); + if (bcnt != (sizeof (int16) * RL_NUMBY)) + return SCPE_IOERR; } if (rlcs_bcnt < RL_NUMBY) { /* more data in buffer? */ cso_buf = rlcs_buf[rlcs_bcnt++]; /* return next word */ @@ -1048,6 +1050,8 @@ switch (rlcs_state) { if (sim_fseek (uptr->fileref, da, SEEK_SET)) return SCPE_IOERR; bcnt = sim_fwrite (rlcs_buf, sizeof (int16), RL_NUMBY, uptr->fileref); + if (bcnt != (sizeof (int16) * RL_NUMBY)) + return SCPE_IOERR; rlcs_state = RL_IDLE; /* now idle */ rlcs_bcnt = 0; cso_csr = cso_csr | CSR_DONE | /* complete */ diff --git a/swtp6800/common/dc-4.c b/swtp6800/common/dc-4.c index b4aff57d..038a2e96 100644 --- a/swtp6800/common/dc-4.c +++ b/swtp6800/common/dc-4.c @@ -502,8 +502,7 @@ int32 fdctrk(int32 io, int32 data) dsk_unit[cur_dsk].u4 = data & 0xFF; if (dsk_dev.dctrl & DEBUG_read) printf("\nfdctrk: Drive %d track set to %d", cur_dsk, dsk_unit[cur_dsk].u4); - } else - ; + } if (dsk_dev.dctrl & DEBUG_write) printf("\nfdctrk: Drive %d track read as %d", cur_dsk, dsk_unit[cur_dsk].u4); return dsk_unit[cur_dsk].u4; @@ -519,8 +518,7 @@ int32 fdcsec(int32 io, int32 data) dsk_unit[cur_dsk].u5 = 1; if (dsk_dev.dctrl & DEBUG_write) printf("\nfdcsec: Drive %d sector set to %d", cur_dsk, dsk_unit[cur_dsk].u5); - } else - ; + } if (dsk_dev.dctrl & DEBUG_read) printf("\nfdcsec: Drive %d sector read as %d", cur_dsk, dsk_unit[cur_dsk].u5); return dsk_unit[cur_dsk].u5;