mirror of
https://github.com/rcornwell/sims.git
synced 2026-01-13 23:35:30 +00:00
KA10: Removed some compiler warnings.
This commit is contained in:
parent
b67386bd12
commit
4e675ca151
@ -130,7 +130,6 @@ static void dpk_set_ospeed (int port, uint64 data)
|
||||
static t_stat dpk_devio(uint32 dev, uint64 *data)
|
||||
{
|
||||
static int scan = 0;
|
||||
DEVICE *dptr = &dpk_dev;
|
||||
int port;
|
||||
|
||||
switch(dev & 07) {
|
||||
|
||||
@ -171,8 +171,6 @@ t_stat imx_reset (DEVICE *dptr)
|
||||
|
||||
t_stat imx_devio(uint32 dev, uint64 *data)
|
||||
{
|
||||
DEVICE *dptr = &imx_dev;
|
||||
|
||||
switch(dev & 07) {
|
||||
case CONO|4:
|
||||
sim_debug(DEBUG_CONO, &imx_dev, "%06llo\n", *data);
|
||||
|
||||
@ -100,7 +100,6 @@ DEVICE mty_dev = {
|
||||
|
||||
static t_stat mty_devio(uint32 dev, uint64 *data)
|
||||
{
|
||||
DEVICE *dptr = &mty_dev;
|
||||
TMLN *lp;
|
||||
int line;
|
||||
uint64 word;
|
||||
|
||||
@ -70,7 +70,6 @@ DEVICE pclk_dev = {
|
||||
*/
|
||||
t_stat pclk_devio(uint32 dev, uint64 *data)
|
||||
{
|
||||
DEVICE *dptr = &pclk_dev;
|
||||
time_t t=time(NULL);
|
||||
struct tm *dt;
|
||||
uint64 hour=12, minute=1, seconds=2, milliseconds=3;
|
||||
|
||||
@ -968,7 +968,6 @@ pmp_startcmd() {
|
||||
void
|
||||
pmp_adjpos(UNIT * uptr)
|
||||
{
|
||||
uint16 addr = GET_UADDR(uptr->flags);
|
||||
struct pmp_t *data = (struct pmp_t *)(uptr->DATAPTR);
|
||||
uint8 *rec;
|
||||
int pos;
|
||||
@ -2138,7 +2137,6 @@ int
|
||||
pmp_format(UNIT * uptr, int flag) {
|
||||
struct pmp_header hdr;
|
||||
struct pmp_t *data;
|
||||
uint16 addr = GET_UADDR(uptr->flags);
|
||||
int type = GET_TYPE(uptr->flags);
|
||||
int tsize;
|
||||
int cyl;
|
||||
@ -2295,7 +2293,6 @@ pmp_detach(UNIT * uptr)
|
||||
{
|
||||
struct pmp_t *data = (struct pmp_t *)uptr->DATAPTR;
|
||||
int type = GET_TYPE(uptr->flags);
|
||||
uint16 addr = GET_UADDR(uptr->flags);
|
||||
int cmd = uptr->CMD & 0x7f;
|
||||
|
||||
if (uptr->CMD & DK_CYL_DIRTY) {
|
||||
@ -2403,7 +2400,6 @@ pmp_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag,
|
||||
fprintf (st, ".\nEach drive has the following storage capacity:\n\n");
|
||||
for (i = 0; disk_type[i].name != 0; i++) {
|
||||
int32 size = disk_type[i].bpt * disk_type[i].heads * disk_type[i].cyl;
|
||||
char sm = 'K';
|
||||
size /= 1024;
|
||||
size = (10 * size) / 1024;
|
||||
fprintf(st, " %-8s %4d.%1dMB\n", disk_type[i].name, size/10, size%10);
|
||||
|
||||
@ -359,8 +359,6 @@ static t_stat stk_svc (UNIT *uptr)
|
||||
|
||||
t_stat stk_devio(uint32 dev, uint64 *data)
|
||||
{
|
||||
DEVICE *dptr = &stk_dev;
|
||||
|
||||
switch(dev & 07) {
|
||||
case CONO:
|
||||
status &= ~STK_PIA;
|
||||
|
||||
@ -98,7 +98,6 @@ DEVICE tk10_dev = {
|
||||
|
||||
static t_stat tk10_devio(uint32 dev, uint64 *data)
|
||||
{
|
||||
DEVICE *dptr = &tk10_dev;
|
||||
TMLN *lp;
|
||||
int port;
|
||||
int ch;
|
||||
|
||||
@ -1793,15 +1793,6 @@ t_stat dtei_svc (UNIT *uptr)
|
||||
/* Handle output of characters to CTY. Started whenever there is output pending */
|
||||
t_stat dteo_svc (UNIT *uptr)
|
||||
{
|
||||
uint32 base = 0;
|
||||
UNIT *optr = &dte_unit[0];
|
||||
|
||||
#if KI_22BIT
|
||||
#if KL_ITS
|
||||
if (!QITS)
|
||||
#endif
|
||||
base = eb_ptr;
|
||||
#endif
|
||||
/* Flush out any pending CTY output */
|
||||
while(not_empty(&cty_out)) {
|
||||
char ch = cty_out.buff[cty_out.out_ptr];
|
||||
@ -1972,7 +1963,7 @@ const char *dte_description (DEVICE *dptr)
|
||||
void
|
||||
lp20_printline(UNIT *uptr, int nl) {
|
||||
int trim = 0;
|
||||
uint16 data1 = 1;
|
||||
|
||||
/* Trim off trailing blanks */
|
||||
while (uptr->COL >= 0 && lp20_buffer[uptr->COL - 1] == ' ') {
|
||||
uptr->COL--;
|
||||
@ -2027,7 +2018,6 @@ t_stat lp20_svc (UNIT *uptr)
|
||||
char ch;
|
||||
uint16 ram_ch;
|
||||
uint16 data1[5];
|
||||
int l = uptr->LINE;
|
||||
|
||||
if ((uptr->flags & UNIT_ATT) == 0)
|
||||
return SCPE_OK;
|
||||
@ -2055,7 +2045,7 @@ t_stat lp20_svc (UNIT *uptr)
|
||||
while (not_empty(&lp20_queue)) {
|
||||
ch = lp20_queue.buff[lp20_queue.out_ptr];
|
||||
inco(&lp20_queue);
|
||||
ram_ch = lp20_ram[ch];
|
||||
ram_ch = lp20_ram[(int)ch];
|
||||
|
||||
/* If previous was delimiter or translation do it */
|
||||
if (uptr->LPST & DELFLG || (ram_ch &(LP20_RAM_DEL|LP20_RAM_TRN)) != 0) {
|
||||
@ -2283,7 +2273,6 @@ t_stat ttyo_svc (UNIT *uptr)
|
||||
{
|
||||
t_stat r;
|
||||
int32 ln;
|
||||
int n = 0;
|
||||
TMLN *lp;
|
||||
|
||||
if ((tty_unit[0].flags & UNIT_ATT) == 0) /* attached? */
|
||||
|
||||
@ -713,9 +713,12 @@ uint8 *nia_cpy_from(t_addr addr, uint8 *data, int len)
|
||||
case 1:
|
||||
word = (uint64)(*data++) << 28;
|
||||
break;
|
||||
default:
|
||||
word = 0;
|
||||
break;
|
||||
}
|
||||
M[addr++] = word;
|
||||
}
|
||||
M[addr++] = word;
|
||||
return data;
|
||||
}
|
||||
|
||||
@ -1200,7 +1203,6 @@ int nia_send_pkt(uint64 cmd)
|
||||
*/
|
||||
t_stat nia_cmd_srv(UNIT * uptr)
|
||||
{
|
||||
t_addr free_q = nia_data.unk_hdr;
|
||||
uint64 word1, word2;
|
||||
uint32 cmd;
|
||||
int len, i;
|
||||
|
||||
@ -1275,8 +1275,6 @@ t_stat null_dev(uint32 dev, uint64 *data) {
|
||||
}
|
||||
|
||||
#if KL
|
||||
static int timer_irq, timer_flg;
|
||||
|
||||
void
|
||||
update_times(int tim)
|
||||
{
|
||||
@ -2303,7 +2301,6 @@ pg_loop:
|
||||
*/
|
||||
int page_lookup(t_addr addr, int flag, t_addr *loc, int wr, int cur_context, int fetch) {
|
||||
int data;
|
||||
int base = 0;
|
||||
int page = (RMASK & addr) >> 9;
|
||||
int uf = (FLAGS & USER) != 0;
|
||||
int pub = (FLAGS & PUBLIC) != 0;
|
||||
@ -2617,7 +2614,6 @@ int exec_page_lookup(t_addr addr, int wr, t_addr *loc)
|
||||
|
||||
int Mem_examine_word(int n, int wrd, uint64 *data) {
|
||||
t_addr addr = 0144 + (8 * n) + eb_ptr;
|
||||
int base = 0;
|
||||
|
||||
if (addr >= MEMSIZE)
|
||||
return 1;
|
||||
@ -2632,7 +2628,6 @@ int Mem_examine_word(int n, int wrd, uint64 *data) {
|
||||
|
||||
int Mem_deposit_word(int n, int wrd, uint64 *data) {
|
||||
t_addr addr = 0146 + (8 * n) + eb_ptr;
|
||||
int base = 0;
|
||||
|
||||
if (addr >= MEMSIZE)
|
||||
return 1;
|
||||
@ -2802,7 +2797,6 @@ load_tlb(int uf, int page)
|
||||
*/
|
||||
int page_lookup(t_addr addr, int flag, t_addr *loc, int wr, int cur_context, int fetch) {
|
||||
int data;
|
||||
int base = 0;
|
||||
int page = (RMASK & addr) >> 9;
|
||||
int uf = (FLAGS & USER) != 0;
|
||||
int pub = (FLAGS & PUBLIC) != 0;
|
||||
@ -3027,7 +3021,6 @@ int its_load_tlb(uint32 reg, int page, uint32 *tlb) {
|
||||
|
||||
int page_lookup_its(t_addr addr, int flag, t_addr *loc, int wr, int cur_context, int fetch) {
|
||||
uint64 data;
|
||||
int base = 0;
|
||||
int page = (RMASK & addr) >> 10;
|
||||
int acc;
|
||||
int uf = (FLAGS & USER) != 0;
|
||||
@ -3281,7 +3274,6 @@ int page_lookup_bbn(t_addr addr, int flag, t_addr *loc, int wr, int cur_context,
|
||||
uint32 tlb_data;
|
||||
uint64 traps;
|
||||
int base = 0;
|
||||
int trap = 0;
|
||||
int lvl = 0;
|
||||
int page = (RMASK & addr) >> 9;
|
||||
int uf = (FLAGS & USER) != 0;
|
||||
@ -5385,6 +5377,7 @@ dpnorm:
|
||||
MQ = CCM(MB) + 1; /* Low */
|
||||
/* High */
|
||||
#if KL
|
||||
flag3 = 0;
|
||||
if ((CCM(AR) + ((MQ & SMASK) != 0)) & SMASK) {
|
||||
FLAGS |= CRY1;
|
||||
flag1 = 1;
|
||||
@ -5458,6 +5451,7 @@ dpnorm:
|
||||
MQ = CCM(MQ) + 1;
|
||||
if (MQ & SMASK) {
|
||||
#if KL
|
||||
flag1 = flag3 = 0;
|
||||
if ((CCM(get_reg(AC)) + 1) & SMASK) {
|
||||
FLAGS |= CRY1;
|
||||
flag1 = 1;
|
||||
@ -9020,6 +9014,7 @@ do_byte_setup(int n, int wr, int *pos, int *sz)
|
||||
ind = (MB & BIT1) != 0;
|
||||
ix = (MB >> 30) & 017;
|
||||
AB = MB & (SECTM|RMASK);
|
||||
temp = MB;
|
||||
if (ix) {
|
||||
temp = get_reg(ix);
|
||||
if ((temp & SMASK) != 0 || (temp & SECTM) == 0) { /* Local index word */
|
||||
@ -9028,8 +9023,7 @@ do_byte_setup(int n, int wr, int *pos, int *sz)
|
||||
temp = temp + AB;
|
||||
temp &= FMASK;
|
||||
MB = temp;
|
||||
} else
|
||||
temp = MB;
|
||||
}
|
||||
sect = cur_sect = (temp >> 18) & 07777;
|
||||
AB = temp & RMASK;
|
||||
glb_sect = 1;
|
||||
@ -9372,28 +9366,28 @@ do_xlate(uint32 tbl, uint64 val, int mask)
|
||||
|
||||
/* Table of powers of 10 for CVTBD opcodes */
|
||||
uint64 pow10_tab[22][2] = {
|
||||
/* 0: */ 0000000000000LL, 0000000000001LL,
|
||||
/* 1: */ 0000000000000LL, 0000000000012LL,
|
||||
/* 2: */ 0000000000000LL, 0000000000144LL,
|
||||
/* 3: */ 0000000000000LL, 0000000001750LL,
|
||||
/* 4: */ 0000000000000LL, 0000000023420LL,
|
||||
/* 5: */ 0000000000000LL, 0000000303240LL,
|
||||
/* 6: */ 0000000000000LL, 0000003641100LL,
|
||||
/* 7: */ 0000000000000LL, 0000046113200LL,
|
||||
/* 8: */ 0000000000000LL, 0000575360400LL,
|
||||
/* 9: */ 0000000000000LL, 0007346545000LL,
|
||||
/* 10: */ 0000000000000LL, 0112402762000LL,
|
||||
/* 11: */ 0000000000002LL, 0351035564000LL,
|
||||
/* 12: */ 0000000000035LL, 0032451210000LL,
|
||||
/* 13: */ 0000000000443LL, 0011634520000LL,
|
||||
/* 14: */ 0000000005536LL, 0142036440000LL,
|
||||
/* 15: */ 0000000070657LL, 0324461500000LL,
|
||||
/* 16: */ 0000001070336LL, 0115760200000LL,
|
||||
/* 17: */ 0000013064257LL, 0013542400000LL,
|
||||
/* 18: */ 0000157013326LL, 0164731000000LL,
|
||||
/* 19: */ 0002126162140LL, 0221172000000LL,
|
||||
/* 20: */ 0025536165705LL, 0254304000000LL,
|
||||
/* 21: */ 0330656232670LL, 0273650000000LL
|
||||
/* 0: */ { 0000000000000LL, 0000000000001LL },
|
||||
/* 1: */ { 0000000000000LL, 0000000000012LL },
|
||||
/* 2: */ { 0000000000000LL, 0000000000144LL },
|
||||
/* 3: */ { 0000000000000LL, 0000000001750LL },
|
||||
/* 4: */ { 0000000000000LL, 0000000023420LL },
|
||||
/* 5: */ { 0000000000000LL, 0000000303240LL },
|
||||
/* 6: */ { 0000000000000LL, 0000003641100LL },
|
||||
/* 7: */ { 0000000000000LL, 0000046113200LL },
|
||||
/* 8: */ { 0000000000000LL, 0000575360400LL },
|
||||
/* 9: */ { 0000000000000LL, 0007346545000LL },
|
||||
/* 10: */ { 0000000000000LL, 0112402762000LL },
|
||||
/* 11: */ { 0000000000002LL, 0351035564000LL },
|
||||
/* 12: */ { 0000000000035LL, 0032451210000LL },
|
||||
/* 13: */ { 0000000000443LL, 0011634520000LL },
|
||||
/* 14: */ { 0000000005536LL, 0142036440000LL },
|
||||
/* 15: */ { 0000000070657LL, 0324461500000LL },
|
||||
/* 16: */ { 0000001070336LL, 0115760200000LL },
|
||||
/* 17: */ { 0000013064257LL, 0013542400000LL },
|
||||
/* 18: */ { 0000157013326LL, 0164731000000LL },
|
||||
/* 19: */ { 0002126162140LL, 0221172000000LL },
|
||||
/* 20: */ { 0025536165705LL, 0254304000000LL },
|
||||
/* 21: */ { 0330656232670LL, 0273650000000LL }
|
||||
};
|
||||
|
||||
/*
|
||||
@ -9784,9 +9778,10 @@ do_extend(uint32 ia)
|
||||
case 012: /* CVTBDO */
|
||||
case 013: /* CVTBDT */
|
||||
/* Save E1 */
|
||||
if (IR == 012)
|
||||
if (IR == 012) {
|
||||
val2 = ((AR & RSIGN) ? LMASK : 0) | (AR & RMASK);
|
||||
else {
|
||||
xlat_sect = cur_sect;
|
||||
} else {
|
||||
val2 = AB;
|
||||
if (QKLB && pc_sect != 0 && glb_sect)
|
||||
xlat_sect = (AR >> 18) & 07777;
|
||||
@ -9875,6 +9870,7 @@ do_extend(uint32 ia)
|
||||
case 015: /* MOVST */
|
||||
case 016: /* MOVSLJ */
|
||||
get_mask(ext_ac+3, &msk);
|
||||
xlat_sect = cur_sect;
|
||||
if ((((get_reg(ext_ac) & (077LL << 26))| get_reg(ext_ac+3)) & EMASK) != 0)
|
||||
return 1;
|
||||
if (IR == 014) {
|
||||
@ -10259,7 +10255,9 @@ t_bool build_dev_tab (void)
|
||||
DEVICE *dptr;
|
||||
DIB *dibp;
|
||||
uint32 i, j, d;
|
||||
#if KL
|
||||
int rh20;
|
||||
#endif
|
||||
int rh_idx;
|
||||
|
||||
/* Set trap offset based on MAOFF flag */
|
||||
@ -10316,7 +10314,9 @@ if (QBBN)
|
||||
|
||||
|
||||
/* Assign all RH10 & RH20 devices */
|
||||
#if KL
|
||||
rh20 = 0540;
|
||||
#endif
|
||||
rh_idx = 0;
|
||||
for (i = 0; (dptr = rh_devs[i]) != NULL; i++) {
|
||||
dibp = (DIB *) dptr->ctxt;
|
||||
|
||||
@ -341,7 +341,6 @@ static int joy_buttons[JOY_MAX_UNITS * JOY_MAX_BUTTONS];
|
||||
|
||||
static void dpy_joy_motion(int which, int axis, int value)
|
||||
{
|
||||
int result = FALSE;
|
||||
if (which < JOY_MAX_UNITS && axis < JOY_MAX_AXES) {
|
||||
joy_axes[which * JOY_MAX_AXES + axis] = value;
|
||||
}
|
||||
@ -349,7 +348,6 @@ static void dpy_joy_motion(int which, int axis, int value)
|
||||
|
||||
static void dpy_joy_button(int which, int button, int state)
|
||||
{
|
||||
int result = FALSE;
|
||||
if (which < JOY_MAX_UNITS && button < JOY_MAX_BUTTONS) {
|
||||
joy_buttons[which * JOY_MAX_UNITS + button] = state;
|
||||
}
|
||||
|
||||
@ -1062,7 +1062,7 @@ dt_boot(int32 unit_num, DEVICE * dptr)
|
||||
{
|
||||
UNIT *uptr = &dptr->units[unit_num];
|
||||
uint32 *fbuf = (uint32 *) uptr->filebuf; /* file buffer */
|
||||
uint64 word;
|
||||
uint64 word = 0;
|
||||
int off;
|
||||
int wc, addr;
|
||||
|
||||
@ -1232,7 +1232,6 @@ void dt_flush (UNIT* uptr)
|
||||
uint16 pdp8b[D8_NBSIZE];
|
||||
uint16 pdp11b[D18_BSIZE];
|
||||
uint32 ba, k, *fbuf;
|
||||
int32 u = uptr - dt_dev.units;
|
||||
|
||||
if (uptr->WRITTEN && uptr->hwmark && ((uptr->flags & UNIT_RO) == 0)) { /* any data? */
|
||||
rewind (uptr->fileref); /* start of file */
|
||||
|
||||
@ -743,7 +743,6 @@ imp_devirq(uint32 dev, t_addr addr) {
|
||||
|
||||
t_stat imp_srv(UNIT * uptr)
|
||||
{
|
||||
DEVICE *dptr = find_dev_from_unit(uptr);
|
||||
int i;
|
||||
int l;
|
||||
|
||||
@ -1017,7 +1016,6 @@ imp_packet_in(struct imp_device *imp)
|
||||
if (ip_hdr->ip_dst == imp_data.ip && imp_data.hostip != 0) {
|
||||
uint8 *payload = (uint8 *)(&imp->rbuffer[pad +
|
||||
(ip_hdr->ip_v_hl & 0xf) * 4]);
|
||||
uint16 chk = ip_hdr->ip_sum;
|
||||
/* If TCP packet update the TCP checksum */
|
||||
if (ip_hdr->ip_p == TCP_PROTO) {
|
||||
struct tcp *tcp_hdr = (struct tcp *)payload;
|
||||
|
||||
@ -491,7 +491,6 @@ t_stat rh_devio(uint32 dev, uint64 *data) {
|
||||
/* Handle KI and KL style interrupt vectors */
|
||||
t_addr
|
||||
rh_devirq(uint32 dev, t_addr addr) {
|
||||
DEVICE *dptr = NULL;
|
||||
struct rh_if *rhc = NULL;
|
||||
int drive;
|
||||
|
||||
|
||||
@ -774,6 +774,7 @@ t_stat load_exb (FILE *fileref, int ftype)
|
||||
return SCPE_OK;
|
||||
}
|
||||
pos = 0;
|
||||
word = 0;
|
||||
for (; wc > 0; wc--, pos++) {
|
||||
if (get_exb_byte(fileref, &byt, ftype))
|
||||
return SCPE_FMT;
|
||||
@ -1124,11 +1125,10 @@ static const char *devnam[NUMDEV] = {
|
||||
t_stat fprint_sym (FILE *of, t_addr addr, t_value *val,
|
||||
UNIT *uptr, int32 sw)
|
||||
{
|
||||
int32 i, j, c, cflag, ac, xr, y, dev;
|
||||
int32 i, j, c, ac, xr, y, dev;
|
||||
uint64 inst;
|
||||
|
||||
inst = val[0];
|
||||
cflag = (uptr == NULL) || (uptr == &cpu_unit[0]);
|
||||
if (sw & SWMASK ('A')) { /* ASCII? */
|
||||
if (inst > 0377)
|
||||
return SCPE_ARG;
|
||||
@ -1250,12 +1250,11 @@ return (ind | (xr << 18) | val);
|
||||
|
||||
t_stat parse_sym (CONST char *cptr, t_addr addr, UNIT *uptr, t_value *val, int32 sw)
|
||||
{
|
||||
int32 cflag, i, j;
|
||||
int32 i, j;
|
||||
t_value ac, dev;
|
||||
t_stat r;
|
||||
char gbuf[CBUFSIZE], cbuf[2*CBUFSIZE];
|
||||
|
||||
cflag = (uptr == NULL) || (uptr == &cpu_unit[0]);
|
||||
while (isspace (*cptr)) cptr++;
|
||||
memset (cbuf, '\0', sizeof(cbuf));
|
||||
strncpy (cbuf, cptr, sizeof(cbuf)-7);
|
||||
|
||||
@ -1072,7 +1072,7 @@ dtc_boot(int32 unit_num, DEVICE * dptr)
|
||||
{
|
||||
UNIT *uptr = &dptr->units[unit_num];
|
||||
uint32 *fbuf = (uint32 *) uptr->filebuf; /* file buffer */
|
||||
uint64 word;
|
||||
uint64 word = 0;
|
||||
int off;
|
||||
int wc, addr;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user