1
0
mirror of https://github.com/simh/simh.git synced 2026-03-03 01:58:53 +00:00

H316, I1401, I1620, I7094, PDP1, PDP11, PDP18B, PDP8: Compiler warning fixups

This commit is contained in:
Mark Pizzolato
2020-12-18 04:03:02 -08:00
parent dc6d05e9f5
commit f9dd01d8a8
10 changed files with 16 additions and 18 deletions

View File

@@ -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 */

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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) &&

View File

@@ -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 */

View File

@@ -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)

View File

@@ -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 */

View File

@@ -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");

View File

@@ -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 */