From dee2c0781d95973ff7991387ba3b7e50d8128159 Mon Sep 17 00:00:00 2001 From: Richard Cornwell Date: Tue, 17 Jan 2023 19:25:40 -0500 Subject: [PATCH] KA10: Cleanup Windows build warning. --- PDP10/ks10_ch11.c | 1 - PDP10/kx10_cpu.c | 1 + PDP10/kx10_tym.c | 16 +++++++--------- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/PDP10/ks10_ch11.c b/PDP10/ks10_ch11.c index 0e2a84f..1d8a37a 100644 --- a/PDP10/ks10_ch11.c +++ b/PDP10/ks10_ch11.c @@ -222,7 +222,6 @@ int ch11_read(DEVICE *dptr, t_addr addr, uint16 *data, int32 access) { struct pdp_dib *dibp = (DIB *)dptr->ctxt; - int i; addr &= dibp->uba_mask; *data = 0; diff --git a/PDP10/kx10_cpu.c b/PDP10/kx10_cpu.c index eedb602..23f69fb 100644 --- a/PDP10/kx10_cpu.c +++ b/PDP10/kx10_cpu.c @@ -13755,6 +13755,7 @@ t_stat cpu_detach (UNIT *uptr) #if PIDP10 pi_panel_stop(); #endif + return SCPE_OK; } /* Memory size change */ diff --git a/PDP10/kx10_tym.c b/PDP10/kx10_tym.c index e49310e..31f3830 100644 --- a/PDP10/kx10_tym.c +++ b/PDP10/kx10_tym.c @@ -191,8 +191,8 @@ static t_stat tym_detach(UNIT *uptr) static uint64 word(int pointer, int base) { - int address = M[tym_base + base] >> 4; - address += M[tym_base + pointer]; + t_addr address = (M[tym_base + base] >> 4) & RMASK; + address += M[tym_base + pointer] & RMASK; return M[address]; } @@ -204,12 +204,12 @@ static void next(int pointer, int size) static void tym_input(uint64 data) { - int address = M[tym_base + IRNG] >> 4; - address += M[tym_base + IBP]; + t_addr address = (M[tym_base + IRNG] >> 4) & RMASK; + address += M[tym_base + IBP] & RMASK; M[address] = data; } -static unsigned room (int h, int t, int s) +static uint64 room (int h, int t, int s) { uint64 head = M[tym_base + h]; uint64 tail = M[tym_base + t]; @@ -528,8 +528,7 @@ static void output_data(int port, int n) data = word(OBP, ORNG); start: for (; i < 4 && n > 0; i++, n--) { - c = data >> 28; - c &= 0177; + c = (data >> 28) & 0177; data <<= 8; sim_debug(DEBUG_DATA, &tym_dev, "Host: send port %d %03o '%c'.\n", port, c, c); @@ -665,8 +664,7 @@ static t_stat tym_output_srv(UNIT *uptr) data = word(OBP, ORNG); - c = data >> 28; - c &= 0177; + c = (data >> 28) & 0177; data <<= 8; sim_debug(DEBUG_DATA, &tym_dev, "Host: send port %d %03o '%c'.\n", output_port, c, c);