3b2: Coverity issue cleanup

This commit is contained in:
Seth Morabito 2017-11-24 18:59:30 -08:00 committed by Mark Pizzolato
parent 690c30b6f4
commit df54c87bf7
3 changed files with 4 additions and 9 deletions

View file

@ -1559,7 +1559,7 @@ t_stat sim_instr(void)
case ALSW3:
a = cpu_read_op(src2);
b = cpu_read_op(src1);
result = a << (b & 0x1f);
result = (t_uint64)a << (b & 0x1f);
cpu_write_op(dst, result);
cpu_set_nz_flags(result, dst);
cpu_set_c_flag(0);
@ -2295,7 +2295,7 @@ t_stat sim_instr(void)
cpu_set_v_flag_op(result, dst);
break;
case MULW2:
result = cpu_read_op(src1) * cpu_read_op(dst);
result = (t_uint64)cpu_read_op(src1) * (t_uint64)cpu_read_op(dst);
cpu_write_op(dst, (uint32)(result & WORD_MASK));
cpu_set_nz_flags((uint32)(result & WORD_MASK), dst);
cpu_set_c_flag(0);
@ -2316,7 +2316,7 @@ t_stat sim_instr(void)
cpu_set_v_flag_op(result, src1);
break;
case MULW3:
result = cpu_read_op(src1) * cpu_read_op(src2);
result = (t_uint64)cpu_read_op(src1) * (t_uint64)cpu_read_op(src2);
cpu_write_op(dst, (uint32)(result & WORD_MASK));
cpu_set_nz_flags((uint32)(result & WORD_MASK), dst);
cpu_set_c_flag(0);

View file

@ -196,11 +196,6 @@ void dmac_program(uint8 reg, uint8 val)
channel = &dma_state.channels[chan_num];
if (channel == NULL) {
/* This should never happen */
return;
}
switch (reg & 1) {
case 0: /* Address */
channel->addr &= ~(0xff << dma_state.bff * 8);

View file

@ -334,7 +334,7 @@ t_stat nvram_detach(UNIT *uptr)
uint32 nvram_read(uint32 pa, size_t size)
{
uint32 offset = pa - NVRAMBASE;
uint32 data;
uint32 data = 0;
uint32 sc = (~(offset & 3) << 3) & 0x1f;
switch(size) {