Fix compiler warnings

This commit is contained in:
Mark Pizzolato 2013-01-23 05:42:36 -08:00
parent a59eb7fa37
commit f7e8024c59
3 changed files with 10 additions and 11 deletions

View file

@ -449,7 +449,7 @@ static const int32 pboot[] = {
t_stat ptr_boot (int32 unitno, DEVICE *dptr) t_stat ptr_boot (int32 unitno, DEVICE *dptr)
{ {
int32 i; size_t i;
for (i = 0; i < PBOOT_SIZE; i++) /* copy bootstrap */ for (i = 0; i < PBOOT_SIZE; i++) /* copy bootstrap */
M[PBOOT_START + i] = pboot[i]; M[PBOOT_START + i] = pboot[i];

View file

@ -451,10 +451,10 @@ t_stat sim_instr (void)
/* Clear Instruction counters */ /* Clear Instruction counters */
inst_ctr.sto = inst_ctr.stx = inst_ctr.sxa = inst_ctr.ado = inst_ctr.slr = inst_ctr.slx = inst_ctr.stz = 0; inst_ctr.sto = inst_ctr.stx = inst_ctr.sxa = inst_ctr.ado = inst_ctr.slr = inst_ctr.slx = inst_ctr.stz = 0;
inst_ctr.add = inst_ctr.adx = inst_ctr.ldx = inst_ctr.aux = inst_ctr.llr = inst_ctr.llx = inst_ctr.lda = inst_ctr.lax = 0; inst_ctr.add = inst_ctr.adx = inst_ctr.ldx = inst_ctr.aux = inst_ctr.llr = inst_ctr.llx = inst_ctr.lda = inst_ctr.lax = 0;
inst_ctr.trn = inst_ctr.trn = inst_ctr.tze = inst_ctr.tsx = inst_ctr.tix = inst_ctr.tra = inst_ctr.trx = inst_ctr.tlv = 0; inst_ctr.trn = inst_ctr.tze = inst_ctr.tsx = inst_ctr.tix = inst_ctr.tra = inst_ctr.trx = inst_ctr.tlv = 0;
inst_ctr.cla = inst_ctr.amb = inst_ctr.cyr = inst_ctr.shr = inst_ctr.mbl = inst_ctr.xmb = inst_ctr.com = inst_ctr.pad = inst_ctr.cry = inst_ctr.anb = inst_ctr.orb = inst_ctr.lmb = inst_ctr.mbx = 0; inst_ctr.cla = inst_ctr.amb = inst_ctr.cyr = inst_ctr.shr = inst_ctr.mbl = inst_ctr.xmb = inst_ctr.com = inst_ctr.pad = inst_ctr.cry = inst_ctr.anb = inst_ctr.orb = inst_ctr.lmb = inst_ctr.mbx = 0;
#define INCR_ADDR(x) ((x+=1) & (MEMSIZE-1)) #define INCR_ADDR(x) ((x+1) & (MEMSIZE-1))
/* Main instruction fetch/decode loop: check events */ /* Main instruction fetch/decode loop: check events */
@ -625,7 +625,7 @@ t_stat sim_instr (void)
AC = AC + MBR; AC = AC + MBR;
if (AC > DMASK) { if (AC > DMASK) {
AC += 1; AC += 1;
} else; }
AC &= DMASK; AC &= DMASK;
inst_ctr.add++; inst_ctr.add++;
break; break;
@ -635,7 +635,7 @@ t_stat sim_instr (void)
AC = AC + MBR; AC = AC + MBR;
if (AC > DMASK) { if (AC > DMASK) {
AC += 1; AC += 1;
} else; }
AC &= DMASK; AC &= DMASK;
inst_ctr.adx++; inst_ctr.adx++;
break; break;
@ -939,7 +939,7 @@ t_stat sim_instr (void)
AC = AC + MBR; AC = AC + MBR;
if (AC > DMASK) { if (AC > DMASK) {
AC += 1; AC += 1;
} else; }
AC &= DMASK; AC &= DMASK;
TRACE_PRINT(ORD_MSG, ("%06o\n", AC)); TRACE_PRINT(ORD_MSG, ("%06o\n", AC));
} else { } else {
@ -1075,7 +1075,7 @@ t_stat cpu_set_size (UNIT *uptr, int32 val, char *cptr, void *desc)
int32 mc = 0; int32 mc = 0;
uint32 i; uint32 i;
if ((val <= 0) || (val > MAXMEMSIZE) || ((val & 07777) != 0)) if ((val <= 0) || (val > (int32)MAXMEMSIZE) || ((val & 07777) != 0))
return SCPE_ARG; return SCPE_ARG;
for (i = val; i < MEMSIZE; i++) mc = mc | M[i]; for (i = val; i < MEMSIZE; i++) mc = mc | M[i];
if ((mc != 0) && (!get_yn ("Really truncate memory [N]?", FALSE))) if ((mc != 0) && (!get_yn ("Really truncate memory [N]?", FALSE)))
@ -1209,7 +1209,7 @@ cpu_get_switches(void)
} }
t_stat sim_load(FILE *fileref, char *cptr, char *fnam, int flag) { t_stat sim_load(FILE *fileref, char *cptr, char *fnam, int flag) {
uint32 cnt = 0, word; uint32 word;
t_addr j, lo, hi, sz, sz_words; t_addr j, lo, hi, sz, sz_words;
char *result; char *result;
@ -1446,7 +1446,7 @@ t_stat sim_opr_orig(int32 op)
AC = AC + MBR; AC = AC + MBR;
if (AC & 01000000) { if (AC & 01000000) {
AC += 1; AC += 1;
} else; }
AC &= DMASK; AC &= DMASK;
TRACE_PRINT(ORD_MSG, ("%06o\n", AC)); TRACE_PRINT(ORD_MSG, ("%06o\n", AC));
inst_ctr.cry++; inst_ctr.cry++;

View file

@ -277,7 +277,7 @@ extern t_stat fprint_sym_orig (FILE *of, t_addr addr, t_value *val,
t_stat fprint_sym (FILE *of, t_addr addr, t_value *val, t_stat fprint_sym (FILE *of, t_addr addr, t_value *val,
UNIT *uptr, int32 sw) UNIT *uptr, int32 sw)
{ {
int32 cflag, i, inst, op; int32 i, inst, op;
if(!cpu_get_mode()) { if(!cpu_get_mode()) {
return fprint_sym_orig (of, addr, val, uptr, sw); return fprint_sym_orig (of, addr, val, uptr, sw);
@ -285,7 +285,6 @@ if(!cpu_get_mode()) {
inst = val[0]; inst = val[0];
cflag = (uptr == NULL) || (uptr == &cpu_unit);
if (sw & SWMASK ('A')) { /* ASCII? */ if (sw & SWMASK ('A')) { /* ASCII? */
if (inst > 0377) return SCPE_ARG; if (inst > 0377) return SCPE_ARG;
fprintf (of, FMTASC (inst & 0177)); fprintf (of, FMTASC (inst & 0177));