From f9dd01d8a888407bd918280075647dd7f1a5f59c Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Fri, 18 Dec 2020 04:03:02 -0800 Subject: [PATCH] H316, I1401, I1620, I7094, PDP1, PDP11, PDP18B, PDP8: Compiler warning fixups --- H316/h316_cpu.c | 10 +++++----- H316/h316_fhd.c | 2 +- I1401/i1401_cpu.c | 2 +- I1620/i1620_tty.c | 4 ++-- I7094/i7094_cd.c | 4 ++-- I7094/i7094_lp.c | 2 +- PDP1/pdp1_sys.c | 2 +- PDP18B/pdp18b_dr15.c | 2 -- PDP18B/pdp18b_lp.c | 4 ++-- PDP8/pdp8_td.c | 2 +- 10 files changed, 16 insertions(+), 18 deletions(-) diff --git a/H316/h316_cpu.c b/H316/h316_cpu.c index c827a2d8..9d3f9a60 100644 --- a/H316/h316_cpu.c +++ b/H316/h316_cpu.c @@ -1105,11 +1105,11 @@ if (((addr == 0) || (addr >= 020)) && MEM_ADDR_OK (addr)) M[addr] = val; if (addr == M_XR) /* write XR loc? */ XR = val; - // [RLA] Implement "break on memory write" ... - if (sim_brk_summ && sim_brk_test (addr, SWMASK ('W'))) - return STOP_IBKPT; - else - return SCPE_OK; +// [RLA] Implement "break on memory write" ... +if (sim_brk_summ && sim_brk_test (addr, SWMASK ('W'))) + return STOP_IBKPT; +else + return SCPE_OK; } /* Add */ diff --git a/H316/h316_fhd.c b/H316/h316_fhd.c index e711adab..9e936e35 100644 --- a/H316/h316_fhd.c +++ b/H316/h316_fhd.c @@ -227,7 +227,7 @@ switch (inst) { /* case on opcode */ ((fnc == 003) && !fhd_ace) || /* 3 = skip if !access err */ ((fnc == 004) && !TST_INTREQ (INT_FHD))) /* 4 = skip if !interrupt */ return IOSKIP (dat); - break; + break; case ioEND: fhd_eor = 1; diff --git a/I1401/i1401_cpu.c b/I1401/i1401_cpu.c index 2d6c9b9d..03c7ca7b 100644 --- a/I1401/i1401_cpu.c +++ b/I1401/i1401_cpu.c @@ -522,7 +522,7 @@ static const int32 mtf_mod[] = { t_stat sim_instr (void) { int32 IS, ilnt, flags; -int32 op, xa, t, wm, ioind, dev, unit; +int32 op, xa, t, wm, ioind = 0, dev = 0, unit = 0; int32 a, b, i, k, asave, bsave; int32 carry, lowprd, sign, ps; int32 quo, qs; diff --git a/I1620/i1620_tty.c b/I1620/i1620_tty.c index d0b53706..a0cbac8b 100644 --- a/I1620/i1620_tty.c +++ b/I1620/i1620_tty.c @@ -412,8 +412,8 @@ switch (cpuio_opc) { /* decode op */ ind[IN_WRCHK] = 1; /* set write check */ if (io_stop) /* set return status */ sta = STOP_INVCHR; - break; - } + break; + } tto_write (ttc & 0x7F); /* write */ PAR = ADDR_A (PAR, 2); /* incr mem addr */ cpuio_cnt = cpuio_cnt + 2; diff --git a/I7094/i7094_cd.c b/I7094/i7094_cd.c index 6499c2de..830c9ca1 100644 --- a/I7094/i7094_cd.c +++ b/I7094/i7094_cd.c @@ -239,7 +239,7 @@ switch (cdr_sta) { /* case on state */ if (uptr->flags & UNIT_CBN) /* column binary? */ colbin = (((uint32) cdr_cbuf[2 * col]) << 6) | ((uint32) cdr_cbuf[(2 * col) + 1]); /* 2 chars -> col bin */ - else colbin = bcd_to_colbin[cdr_cbuf[col]]; /* cvt to col binary */ + else colbin = bcd_to_colbin[cdr_cbuf[col] & 077]; /* cvt to col binary */ dat = bit_masks[35 - (col % 36)]; /* mask for column */ for (row = 0; row < 12; row++) { /* rows 9..0, 11, 12 */ bufw = (row * 2) + (col / 36); /* index to buffer */ @@ -447,7 +447,7 @@ for (col = 0; col < 72; col++) { /* process 72 columns */ } else { /* text */ bcd = colbin_to_bcd (colbin); /* column bin -> BCD */ - cdp_cbuf[col] = pch[bcd]; /* -> ASCII */ + cdp_cbuf[col] = pch[bcd & 077]; /* -> ASCII */ } } for (i = ((2 * CD_CHRLNT) + 1); (i > 0) && diff --git a/I7094/i7094_lp.c b/I7094/i7094_lp.c index 0a306b24..cd09e108 100644 --- a/I7094/i7094_lp.c +++ b/I7094/i7094_lp.c @@ -330,7 +330,7 @@ for (col = 0; col < 72; col++) { /* proc 72 columns */ colbin |= col_masks[row]; } bcd = colbin_to_bcd (colbin); /* column bin -> BCD */ - lpt_cbuf[col] = pch[bcd]; /* -> ASCII */ + lpt_cbuf[col] = pch[bcd & 077]; /* -> ASCII */ } for (i = LPT_CHRLNT; (i > 0) && (lpt_cbuf[i - 1] == ' '); --i) ; /* trim spaces */ diff --git a/PDP1/pdp1_sys.c b/PDP1/pdp1_sys.c index e0be5725..0ebee7cd 100644 --- a/PDP1/pdp1_sys.c +++ b/PDP1/pdp1_sys.c @@ -444,7 +444,7 @@ return sp; #define FMTASC(x) ((x) < 040)? "<%03o>": "%c", (x) #define SIXTOASC(x) fiodec_to_ascii[x] -#define ASCTOSIX(x) (ascii_to_fiodec[x] & 077) +#define ASCTOSIX(x) (ascii_to_fiodec[(x) & 0177] & 077) t_stat fprint_sym (FILE *of, t_addr addr, t_value *val, UNIT *uptr, int32 sw) diff --git a/PDP18B/pdp18b_dr15.c b/PDP18B/pdp18b_dr15.c index 5713fdf0..e36571ac 100644 --- a/PDP18B/pdp18b_dr15.c +++ b/PDP18B/pdp18b_dr15.c @@ -143,8 +143,6 @@ DEVICE dr15_dev = { int32 dr60 (int32 dev, int32 pulse, int32 AC) { -int32 subdev = (pulse >> 4) & 03; - if (((pulse & 01) != 0) && (dr15_tcb_ack != 0)) /* SIOA */ AC |= IOT_SKP; if ((pulse & 02) != 0) /* CIOP */ diff --git a/PDP18B/pdp18b_lp.c b/PDP18B/pdp18b_lp.c index 8931008e..fa8e5869 100644 --- a/PDP18B/pdp18b_lp.c +++ b/PDP18B/pdp18b_lp.c @@ -826,10 +826,10 @@ for (more = 1; more != 0; ) { /* loop until ctrl */ ccnt = 5; } for (i = 0; i < ccnt; i++) { /* loop through */ - if ((c[i] <= 037) && ctrl[c[i]]) { /* control char? */ + if ((c[i] <= 037) && ctrl[c[i] & 037]) { /* control char? */ lp15_buf[lp15_bp] = 0; /* append nul */ fputs (lp15_buf, uptr->fileref); /* print line */ - fputs (ctrl[c[i]], uptr->fileref); /* space */ + fputs (ctrl[c[i] & 037], uptr->fileref); /* space */ uptr->pos = ftell (uptr->fileref); if (ferror (uptr->fileref)) { /* error? */ perror ("LPT I/O error"); diff --git a/PDP8/pdp8_td.c b/PDP8/pdp8_td.c index e49f2644..55bad9a0 100644 --- a/PDP8/pdp8_td.c +++ b/PDP8/pdp8_td.c @@ -408,7 +408,7 @@ return FALSE; t_bool td_setpos (UNIT *uptr) { uint32 new_time, ut, ulin, udelt; -int32 delta; +int32 delta = 0; new_time = sim_grtime (); /* current time */ ut = new_time - uptr->LASTT; /* elapsed time */