B5500: Avoid potential truncataion warning with type consistency

This commit is contained in:
Mark Pizzolato 2020-01-31 00:16:43 -08:00
parent 9ba85568ac
commit f01e8900ed
2 changed files with 4 additions and 4 deletions

View file

@ -72,7 +72,7 @@ typedef struct _opcode
} }
t_opcode; t_opcode;
void print_opcode(FILE * ofile, t_value val, int chr_mode); void print_opcode(FILE * ofile, uint16 val, int chr_mode);
t_stat chan_reset(DEVICE *); t_stat chan_reset(DEVICE *);
t_stat chan_boot(t_uint64); t_stat chan_boot(t_uint64);

View file

@ -341,7 +341,7 @@ t_opcode char_ops[] = {
/* Print out an instruction */ /* Print out an instruction */
void void
print_opcode(FILE * of, t_value val, int chr_mode) print_opcode(FILE * of, uint16 val, int chr_mode)
{ {
uint16 op; uint16 op;
t_opcode *tab = (chr_mode) ? char_ops: word_ops; t_opcode *tab = (chr_mode) ? char_ops: word_ops;
@ -410,14 +410,14 @@ fprint_sym(FILE * of, t_addr addr, t_value * val, UNIT * uptr, int32 sw)
if (sw & SWMASK('W')) { /* Word mode opcodes */ if (sw & SWMASK('W')) { /* Word mode opcodes */
fputs(" ", of); fputs(" ", of);
for (i = 36; i >= 0; i-=12) { for (i = 36; i >= 0; i-=12) {
int op = (int)(inst >> i) & 07777; uint16 op = (uint16)(inst >> i) & 07777;
print_opcode(of, op, 0); print_opcode(of, op, 0);
} }
} }
if (sw & SWMASK('C')) { /* Char mode opcodes */ if (sw & SWMASK('C')) { /* Char mode opcodes */
fputs(" ", of); fputs(" ", of);
for (i = 36; i >= 0; i-=12) { for (i = 36; i >= 0; i-=12) {
int op = (int)(inst >> i) & 07777; uint16 op = (uint16)(inst >> i) & 07777;
print_opcode(of, op, 1); print_opcode(of, op, 1);
} }
} }