mirror of
https://github.com/open-simh/simh.git
synced 2026-01-11 23:53:30 +00:00
B5500: Avoid potential truncataion warning with type consistency
This commit is contained in:
parent
9ba85568ac
commit
f01e8900ed
@ -72,7 +72,7 @@ typedef struct _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_boot(t_uint64);
|
||||
|
||||
@ -341,7 +341,7 @@ t_opcode char_ops[] = {
|
||||
|
||||
/* Print out an instruction */
|
||||
void
|
||||
print_opcode(FILE * of, t_value val, int chr_mode)
|
||||
print_opcode(FILE * of, uint16 val, int chr_mode)
|
||||
{
|
||||
uint16 op;
|
||||
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 */
|
||||
fputs(" ", of);
|
||||
for (i = 36; i >= 0; i-=12) {
|
||||
int op = (int)(inst >> i) & 07777;
|
||||
uint16 op = (uint16)(inst >> i) & 07777;
|
||||
print_opcode(of, op, 0);
|
||||
}
|
||||
}
|
||||
if (sw & SWMASK('C')) { /* Char mode opcodes */
|
||||
fputs(" ", of);
|
||||
for (i = 36; i >= 0; i-=12) {
|
||||
int op = (int)(inst >> i) & 07777;
|
||||
uint16 op = (uint16)(inst >> i) & 07777;
|
||||
print_opcode(of, op, 1);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user