1
0
mirror of https://github.com/simh/simh.git synced 2026-01-25 19:56:25 +00:00

Cleaned up parameter declarations in all simulators to achieve clean compiles on all platforms

Very minor in all cases, but the strange case of swtp_cpu.c
This module used expressions of the form:
   PC = ++PC & ADDRMASK;
Officially, the C language says that expressions which modify the same variable in more than one place have undefined behavior.
These were changed to the legal form which performs the desired action:
   PC = (PC + 1) & ADDRMASK;
This commit is contained in:
Mark Pizzolato
2011-04-15 09:04:39 -07:00
parent eb514e2a8d
commit a6964f849d
32 changed files with 126 additions and 125 deletions

View File

@@ -130,7 +130,7 @@ t_stat rx_wr (int32 data, int32 PA, int32 access);
t_stat rx_svc (UNIT *uptr);
t_stat rx_reset (DEVICE *dptr);
t_stat rx_boot (int32 unitno, DEVICE *dptr);
void rx_done (int esr_flags, int new_ecode);
void rx_done (int32 esr_flags, int32 new_ecode);
/* RX11 data structures

View File

@@ -161,7 +161,7 @@ t_stat ry_wr (int32 data, int32 PA, int32 access);
t_stat ry_svc (UNIT *uptr);
t_stat ry_reset (DEVICE *dptr);
t_stat ry_boot (int32 unitno, DEVICE *dptr);
void ry_done (int esr_flags, int new_ecode);
void ry_done (int32 esr_flags, int32 new_ecode);
t_stat ry_set_size (UNIT *uptr, int32 val, char *cptr, void *desc);
t_stat ry_attach (UNIT *uptr, char *cptr);

View File

@@ -735,7 +735,7 @@ fnc = GET_FNC (cmdhdr); /* get fnc+mode */
mod = GET_MOD (cmdhdr);
if (DEBUG_PRS (ts_dev))
fprintf (sim_deb, ">>TS: cmd=%s, mod=%o, buf=%o, lnt=%d, pos=%d\n",
fnc_name[fnc], mod, cmdadl, cmdlnt, ts_unit.pos);
fnc_name[fnc], mod, cmdadl, cmdlnt, (int)ts_unit.pos);
if ((fnc != FNC_WCHR) && (tssr & TSSR_NBA)) { /* ~wr chr & nba? */
ts_endcmd (TC3, 0, 0); /* error */
return SCPE_OK;
@@ -1018,7 +1018,7 @@ if (cmdhdr & CMD_IE)
ts_ownm = 0; ts_ownc = 0;
if (DEBUG_PRS (ts_dev))
fprintf (sim_deb, ">>TS: sta=%o, tc=%o, rfc=%d, pos=%d\n",
msgxs0, GET_TC (tssr), msgrfc, ts_unit.pos);
msgxs0, GET_TC (tssr), msgrfc, (int)ts_unit.pos);
return;
}

View File

@@ -598,7 +598,7 @@ return MBE_GOE;
/* Abort transfer */
t_stat tu_abort (void)
int32 tu_abort (void)
{
return tu_reset (&tu_dev);
}