1
0
mirror of https://github.com/rcornwell/sims.git synced 2026-03-10 12:29:26 +00:00

KA10: Removed compiler warnings.

This commit is contained in:
Richard Cornwell
2024-03-12 12:33:14 -04:00
parent 3f579eddfd
commit 408422e1c8
10 changed files with 14 additions and 20 deletions

View File

@@ -447,7 +447,6 @@ dz_checkirq(struct pdp_dib *dibp)
int ln;
int stop;
TMLN *lp;
int irq = 0;
for (i = 0; i < NUM_DEVS_DZ; i++) {
if ((dz_csr[i] & MSE) == 0)

View File

@@ -81,7 +81,6 @@ tcu_write(DEVICE *dptr, t_addr addr, uint16 data, int32 access)
int
tcu_read(DEVICE *dptr, t_addr addr, uint16 *data, int32 access)
{
struct pdp_dib *dibp = (DIB *)dptr->ctxt;
time_t curtim;
struct tm *tptr;

View File

@@ -79,11 +79,8 @@ uba_read(t_addr addr, int ctl, uint64 *data, int access)
*data = (uint64)uba_map[ubm][addr & 077];
return 0;
} else if ((addr & 077) == 0) {
int pih, pil;
int irqf = 0;
*data = (uint64)uba_status[ubm];
pih = 0200 >> ((uba_status[ubm] >> 3) & 07);
pil = 0200 >> (uba_status[ubm] & 07);
for (i = 0; i < 128; i++) {
if ((uba_irq_ctlr[i] & VECT_CTR) == ctl)
irqf |= uba_irq_ctlr[i];

View File

@@ -246,7 +246,7 @@ t_stat ddc_svc (UNIT *uptr)
uint64 word;
DEVICE *dptr;
UNIT *duptr;
t_stat err;
dptr = &ddc_dev;
sec = (ddc_cmd[ddc_cmdptr] & DDC_SEC) >> 2;
trk = (ddc_cmd[ddc_cmdptr] & DDC_TRK) >> 7;
@@ -275,7 +275,7 @@ t_stat ddc_svc (UNIT *uptr)
if (uptr->POS == 0) {
int da;
da = ((trk * 13) + sec) * DDC10_WDS;
err = sim_fseek(duptr->fileref, da * sizeof(uint64), SEEK_SET);
(void)sim_fseek(duptr->fileref, da * sizeof(uint64), SEEK_SET);
wc = sim_fread (&ddc_buf[0], sizeof(uint64),
DDC10_WDS, duptr->fileref);
sim_debug(DEBUG_DETAIL, dptr, "DDC %d Read %d %d %d %d %d %o\n",
@@ -305,7 +305,7 @@ done:
if (func == 2) {
int da;
da = ((trk * 13) + sec) * DDC10_WDS;
err = sim_fseek(duptr->fileref, da * sizeof(uint64), SEEK_SET);
(void)sim_fseek(duptr->fileref, da * sizeof(uint64), SEEK_SET);
wc = sim_fwrite (&ddc_buf[0], sizeof(uint64),
DDC10_WDS, duptr->fileref);
sim_debug(DEBUG_DETAIL, dptr, "DDC %d Write %d %d %d %d %d %o\n",

View File

@@ -363,6 +363,7 @@ static void dpy_joy_button(int which, int button, int state)
}
}
#if ITS
static int dpy_keyboard (SIM_KEY_EVENT *ev)
{
sim_debug(DEBUG_DATA, &dpy_dev, "Key %d %s\n",
@@ -373,6 +374,7 @@ static int dpy_keyboard (SIM_KEY_EVENT *ev)
}
return 0;
}
#endif
/* Reset routine */

View File

@@ -545,7 +545,6 @@ t_stat dt_devio(uint32 dev, uint64 *data) {
}
void dt_getword(uint64 *data, int req) {
int dev = dt_dib.dev_num;
clr_interrupt(DT_DEVNUM|4);
if (dtsb & DTB_DATREQ) {
dtsb |= DTB_MIS;
@@ -559,7 +558,6 @@ void dt_getword(uint64 *data, int req) {
}
void dt_putword(uint64 *data) {
int dev = dt_dib.dev_num;
clr_interrupt(DT_DEVNUM|4);
if (dtsb & DTB_DATREQ) {
dtsb |= DTB_MIS;

View File

@@ -1094,18 +1094,17 @@ rp_boot(int32 unit_num, DEVICE * rptr)
{
UNIT *uptr = &rptr->units[unit_num];
int ctlr = GET_CNTRL_RH(uptr->flags);
int dtype = GET_DTYPE(uptr->flags);
uint16 *regs = (uint16 *)(uptr->up7);
struct rh_if *rhc = &rp_rh[ctlr];
DEVICE *dptr = uptr->dptr;
uint32 addr;
uint32 ptr = 0;
uint64 word;
#if !KS
int wc;
#endif
#if KS
int dtype = GET_DTYPE(uptr->flags);
int da;
t_stat r;
uint64 len;
@@ -1147,8 +1146,8 @@ rp_boot(int32 unit_num, DEVICE * rptr)
regs[RPDC] = (int32)((rp_buf[0][04] >> 24) << DC_V_CY);
len = (int)(((rp_buf[0][05] & 077) * 4) & RMASK);
}
if (len == 0)
len = 4;
if (len == 0)
len = 4;
/* Read len sectors into address 1000 */
addr = 01000;
for (; len > 0; len--) {
@@ -1176,6 +1175,8 @@ if (len == 0)
rh_boot_unit = unit_num;
#elif KL
int sect;
uint32 ptr = 0;
/* KL does not support readin, so fake it by reading in sectors 4 to 7 */
/* Possible in future find boot loader in FE file system */
addr = (MEMSIZE - 512) & RMASK;
@@ -1189,6 +1190,8 @@ if (len == 0)
}
word = (MEMSIZE - 512) & RMASK;
#else
uint32 ptr = 0;
disk_read(uptr, &rp_buf[0][0], 0, RP_NUMWD);
addr = rp_buf[0][ptr] & RMASK;
wc = (rp_buf[0][ptr++] >> 18) & RMASK;

View File

@@ -416,7 +416,6 @@ tu_write(DEVICE *dptr, struct rh_if *rhc, int reg, uint32 data) {
int
tu_read(DEVICE *dptr, struct rh_if *rhc, int reg, uint32 *data) {
int ctlr = GET_CNTRL_RH(dptr->units[0].flags);
uint16 *regs = &rhc->regs[0];
int unit = regs[TUTC] & 07;
UNIT *uptr = &dptr->units[unit];

View File

@@ -263,7 +263,6 @@ dsk_svc (UNIT *uptr)
int wc;
uint64 data;
DEVICE *dptr;
t_stat err;
dptr = &dsk_dev;
@@ -279,7 +278,7 @@ dsk_svc (UNIT *uptr)
if (sec > DSK_SECS)
sec -= DSK_SECS;
da = (sec + (cyl * DSK_SECS)) * DSK_WDS;
err = sim_fseek(uptr->fileref, da * sizeof(uint64), SEEK_SET);
(void)sim_fseek(uptr->fileref, da * sizeof(uint64), SEEK_SET);
(void)sim_fwrite (&dsk_buf[0], sizeof(uint64),
DSK_WDS, uptr->fileref);
sim_debug(DEBUG_DETAIL, dptr, "DSK %d Write %d %d\n", ctlr, da, cyl);
@@ -337,7 +336,7 @@ dsk_svc (UNIT *uptr)
if (sec > DSK_SECS)
sec -= DSK_SECS;
da = (sec + (cyl * DSK_SECS)) * DSK_WDS;
err = sim_fseek(uptr->fileref, da * sizeof(uint64), SEEK_SET);
(void)sim_fseek(uptr->fileref, da * sizeof(uint64), SEEK_SET);
wc = sim_fread (&dsk_buf[0], sizeof(uint64),
DSK_WDS, uptr->fileref);
sim_debug(DEBUG_DETAIL, dptr, "DSK %d Read %d %d\n", ctlr, da, cyl);

View File

@@ -1281,8 +1281,6 @@ dtc_flush (UNIT* uptr)
t_stat
dtc_detach (UNIT* uptr)
{
int32 u = uptr - dtc_dev.units;
if (!(uptr->flags & UNIT_ATT))
return SCPE_OK;
if (sim_is_active (uptr)) {