1
0
mirror of https://github.com/simh/simh.git synced 2026-04-15 16:11:13 +00:00

Compiler suggested cleanups.

Mostly silencing noise warnings, but bugs were found in sim_console.c and pdp11_dmc.c
This commit is contained in:
Mark Pizzolato
2014-02-14 17:07:45 -08:00
parent dcbb89499e
commit 02cb5c2d88
44 changed files with 520 additions and 515 deletions

View File

@@ -557,7 +557,7 @@ if ((ba | bc) & 03) { /* check alignment */
if (!qba_map_addr (ba + i, &ma)) /* inv or NXM? */
return (bc - i);
}
*buf = ReadB (ma);
*buf = (uint8)ReadB (ma);
ma = ma + 1;
}
}
@@ -591,7 +591,7 @@ if ((ba | bc) & 03) { /* check alignment */
if (!qba_map_addr (ba + i, &ma)) /* inv or NXM? */
return (bc - i);
}
*buf = ReadW (ma);
*buf = (uint16)ReadW (ma);
ma = ma + 2;
}
}

View File

@@ -122,7 +122,7 @@ switch (rg) {
}
else {
if (ctx->port[PORT_A].put_char != NULL)
ctx->port[PORT_A].put_char (data);
ctx->port[PORT_A].put_char ((uint8)data);
}
ua2681_update_txi (ctx);
break;
@@ -183,7 +183,7 @@ switch (rg) {
}
else {
if (ctx->port[PORT_B].put_char != NULL)
ctx->port[PORT_B].put_char (data);
ctx->port[PORT_B].put_char ((uint8)data);
}
ua2681_update_txi (ctx);
break;

View File

@@ -725,7 +725,7 @@ if ((ba | bc) & 03) { /* check alignment */
if (!qba_map_addr (ba + i, &ma)) /* inv or NXM? */
return (bc - i);
}
*buf = ReadB (ma);
*buf = (uint8)ReadB (ma);
ma = ma + 1;
}
}
@@ -759,7 +759,7 @@ if ((ba | bc) & 03) { /* check alignment */
if (!qba_map_addr (ba + i, &ma)) /* inv or NXM? */
return (bc - i);
}
*buf = ReadW (ma);
*buf = (uint16)ReadW (ma);
ma = ma + 2;
}
}

View File

@@ -464,7 +464,7 @@ return tptr;
t_stat get_spec (char *cptr, int32 addr, int32 n1, int32 *sptr, int32 *dptr)
{
int32 reg, indir, pflag, disp;
int32 reg, indir, pflag, disp = 0;
indir = 0; /* no indirect */
pflag = 0;

View File

@@ -601,7 +601,8 @@ return vc_buf[rg];
void vc_mem_wr (int32 pa, int32 val, int32 lnt)
{
uint32 rg = (pa >> 2) & 0xFFFF;
int32 nval, i;
uint32 nval;
int32 i;
int32 sc;
uint32 scrln, bufln;
uint32 idx;
@@ -610,12 +611,12 @@ if (!vc_buf) /* QVSS disabled? */
MACH_CHECK (MCHK_WRITE); /* Invalid memory reference */
if (lnt < L_LONG) {
int32 mask = (lnt == L_WORD)? 0xFFFF: 0xFF;
int32 t = vc_buf[rg];
uint32 mask = (lnt == L_WORD)? 0xFFFF: 0xFF;
uint32 t = vc_buf[rg];
sc = (pa & 3) << 3;
nval = ((val & mask) << sc) | (t & ~(mask << sc));
}
else nval = val;
else nval = (uint32)val;
if (rg >= 0xFFF8) { /* cursor image */
idx = (pa << 3) & 0xFF; /* get byte index */