1
0
mirror of https://github.com/rcornwell/sims.git synced 2026-03-27 10:20:52 +00:00

I7000: Removed compiler warnings.

This commit is contained in:
Richard Cornwell
2020-10-12 23:28:38 -04:00
parent 1273a6236a
commit 063f2d0c1f
7 changed files with 25 additions and 26 deletions

View File

@@ -514,7 +514,7 @@ t_stat com_svc(UNIT * uptr)
/* Grab next entry. */
in_head++;
/* Wrap around end of ring */
if (in_head >= (sizeof(in_buff)/sizeof(uint16)))
if (in_head >= (int)((sizeof(in_buff)/sizeof(uint16))))
in_head = 0;
com_data = in_buff[in_head];
/* Check if end of current transfer */
@@ -1097,7 +1097,7 @@ com_post_eom()
sim_debug(DEBUG_EXP, &com_dev, "inserting eom %d %d %d\n",
in_head, in_tail, in_count);
ent = in_tail + 1;
if (ent >= (sizeof(in_buff)/sizeof(uint16))) /* Wrap around */
if (ent >= (int)((sizeof(in_buff)/sizeof(uint16)))) /* Wrap around */
ent = 0;
if (ent != in_head) { /* If next element would be head, queue is full */
/* If we can't put one on, handler will do it for us */
@@ -1120,12 +1120,12 @@ com_inp_msg(uint32 ln, uint16 msg)
sim_debug(DEBUG_EXP, &com_dev, "inserting %d %04o %d %d %d\n", ln, msg,
in_head, in_tail, in_count);
ent1 = in_tail + 1;
if (ent1 >= (sizeof(in_buff)/sizeof(uint16))) /* Wrap around */
if (ent1 >= (int)((sizeof(in_buff)/sizeof(uint16)))) /* Wrap around */
ent1 = 0;
if (ent1 == in_head) /* If next element would be head, queue is full */
return TRUE;
ent2 = ent1 + 1;
if (ent2 >= (sizeof(in_buff)/sizeof(uint16))) /* Wrap around */
if (ent2 >= (int)((sizeof(in_buff)/sizeof(uint16)))) /* Wrap around */
ent2 = 0;
if (ent2 == in_head) /* If next element would be head, queue is full */
return TRUE;

View File

@@ -253,7 +253,7 @@ extern DEBTAB crd_debug[];
#define UNIT_V_CHAN (UNIT_V_SELECT + 1) /* 10 */
#define UNIT_CHAN (017 << UNIT_V_CHAN) /* 10-14 */
#define UNIT_S_CHAN(x) (UNIT_CHAN & ((x) << UNIT_V_CHAN))
#define UNIT_G_CHAN(x) ((UNIT_CHAN & (x)) >> UNIT_V_CHAN)
#define UNIT_G_CHAN(x) ((int)((UNIT_CHAN & (x)) >> UNIT_V_CHAN))
#define UNIT_V_LOCAL (UNIT_V_UF + 0) /* 0 */
#define DEV_BUF_NUM(x) (((x) & 07) << DEV_V_UF)
#define GET_DEV_BUF(x) (((x) >> DEV_V_UF) & 07)

View File

@@ -134,7 +134,7 @@ lpr_setlpp(UNIT *uptr, int32 val, CONST char *cptr, void *desc)
}
if (i < 20 || i > 100)
return SCPE_ARG;
uptr->capac = i;
uptr->u6 = i;
uptr->u4 = 0;
return SCPE_OK;
}
@@ -144,7 +144,7 @@ lpr_getlpp(FILE *st, UNIT *uptr, int32 v, CONST void *desc)
{
if (uptr == NULL)
return SCPE_IERR;
fprintf(st, "linesperpage=%d", uptr->capac);
fprintf(st, "linesperpage=%d", uptr->u6);
return SCPE_OK;
}
@@ -185,7 +185,7 @@ print_line(UNIT * uptr, int chan, int unit)
case 1:
case 9: if (uptr->u4 == 1)
break;
i = uptr->capac - uptr->u4 + 1; break;
i = uptr->u6 - uptr->u4 + 1; break;
}
if (i == 0)
break;
@@ -231,7 +231,7 @@ print_line(UNIT * uptr, int chan, int unit)
sim_putchar(out[j++]);
}
uptr->u4++;
if (uptr->u4 > (int32)uptr->capac) {
if (uptr->u4 > (int32)uptr->u6) {
uptr->u4 = 1;
}
@@ -255,7 +255,7 @@ print_line(UNIT * uptr, int chan, int unit)
sim_putchar('\n');
}
uptr->u4++;
if (uptr->u4 > (int32)uptr->capac) {
if (uptr->u4 > (int32)uptr->u6) {
uptr->u4 = 1;
}
}
@@ -266,7 +266,7 @@ print_line(UNIT * uptr, int chan, int unit)
if (uptr->u4 == 1)
lpr_chan9[chan] = 1;
#ifdef I7010
if (uptr->u4 == uptr->capac)
if (uptr->u4 == uptr->u6)
lpr_chan12[chan] = 1;
#endif
@@ -356,8 +356,8 @@ uint32 lpr_cmd(UNIT * uptr, uint16 cmd, uint16 dev)
case 1:
case 9: if (uptr->u4 == 1)
break;
i = uptr->capac - uptr->u4 + 1; break;
case 12: i = (uptr->capac/2) - uptr->u4; break;
i = uptr->u6 - uptr->u4 + 1; break;
case 12: i = (uptr->u6/2) - uptr->u4; break;
}
if (i == 0)
break;
@@ -377,7 +377,7 @@ uint32 lpr_cmd(UNIT * uptr, uint16 cmd, uint16 dev)
}
break;
}
if (uptr->u4 == uptr->capac)
if (uptr->u4 == uptr->u6)
lpr_chan12[chan] = 1;
#endif
if (uptr->u4 == 1)

View File

@@ -849,7 +849,7 @@ t_stat mt_srv(UNIT * uptr)
return mt_error(uptr, chan, MTSE_TMK, dptr);
}
/* If at end of record, fill buffer */
if (uptr->u6 == uptr->hwmark) {
if (uptr->u6 == (int32)uptr->hwmark) {
sim_debug(DEBUG_DETAIL, dptr, "Read unit=%d ", unit);
uptr->u3 += GAP_LEN;
if ((r = sim_tape_rdrecf(uptr, &mt_buffer[bufnum][0], &reclen,
@@ -1044,7 +1044,7 @@ t_stat mt_srv(UNIT * uptr)
return mt_error(uptr, chan, MTSE_TMK, dptr);
}
/* If at end of record, fill buffer */
if (uptr->u6 == uptr->hwmark) {
if (uptr->u6 == (int32)uptr->hwmark) {
sim_debug(DEBUG_DETAIL, dptr, "Read unit=%d ", unit);
if ((r = sim_tape_rdrecr(uptr, &mt_buffer[bufnum][0], &reclen,
BUFFSIZE)) != MTSE_OK) {

View File

@@ -151,7 +151,7 @@ int
chan_cmd(uint16 dev, uint16 dcmd)
{
UNIT *uptr;
uint32 chan;
int32 chan;
DEVICE **dptr;
DIB *dibp;
int j;

View File

@@ -290,7 +290,7 @@ sim_instr(void)
uint8 op2 = 0;
int iowait = 0; /* Wait for IO to start */
int chwait = 0; /* Wait for channel to be inactive */
int sign;
uint8 sign;
int instr_count = 0; /* Number of instructions to execute */
if (sim_step != 0) {
@@ -560,7 +560,7 @@ sim_instr(void)
temp &= ldmask[f2-f1+1];
/* Compute final sign */
if ((opcode & 0x10f) == (OP_AAS1 & 0x10f)) {
sign = utmp;
sign = (uint8)(utmp & 0xf);
} else if (sign & 0xc) {
sign = ASIGN >> 40;
} else if (sign & 2) {
@@ -679,7 +679,7 @@ sim_instr(void)
case OP_M:
/* Multiplicand in AC[3] */
AC[1] = AC[2] = 0;
sign = (MBR & SMASK) >> 40;
sign = (uint8)(((MBR & SMASK) >> 40) & 0xf);
MBR = (rdmask[f1] & MBR) >> ((9 - f2) * 4);
sign = (((AC[3] & SMASK) >> 40) != sign) ? 6 : 9;
/* Multiply MBR * AC[3] result to AC[1],AC[2] <low> */
@@ -714,7 +714,7 @@ sim_instr(void)
case OP_D:
/* dividend AC[1],AC[2] */
/* divisor in MBR */
sign = (MBR & SMASK) >> 40;
sign = (uint8)(((MBR & SMASK) >> 40) & 0xf);
AC[3] = (rdmask[f1] & MBR) >> ((9 - f2) * 4);
if (AC[3] == 0) {
AC[3] |= ((t_uint64)sign) << 40;
@@ -1536,7 +1536,7 @@ sim_instr(void)
hst[hst_p].before = MBR;
}
temp = dec_bin_idx(MBR);
sign = ((MBR & SMASK)>> 40);
sign = (uint8)(((MBR & SMASK)>> 40) & 0xf);
MBR &= DMASK;
switch(sign) {
case 0x6: /* + - tc b add */
@@ -1567,7 +1567,7 @@ sim_instr(void)
}
temp = 0;
upd_idx(&temp, MA);
sign = ((MBR & SMASK)>> 40);
sign = (uint8)(((MBR & SMASK)>> 40) & 0xf);
MBR &= DMASK;
switch(sign) {
default:

View File

@@ -814,8 +814,7 @@ chan_proc()
uptr = (*dptr)->units;
for (j = 0; j < num; j++, uptr++) {
if ((uptr->flags & UNIT_DIS) == 0 &&
UNIT_G_CHAN(uptr->flags) ==
(unsigned int)chan &&
UNIT_G_CHAN(uptr->flags) == chan &&
(sms[chan] & 1) ==
((UNIT_SELECT & uptr->flags) != 0)) {
goto found;
@@ -1247,7 +1246,7 @@ int
chan_cmd(uint16 dev, uint16 dcmd)
{
UNIT *uptr;
uint32 chan;
int32 chan;
DEVICE **dptr;
DIB *dibp;
int j;