3b2: Coverity issue cleanup

This commit is contained in:
Seth Morabito 2017-11-30 16:30:53 +00:00
parent 0293d7f4af
commit 0a00d8066a
3 changed files with 9 additions and 2 deletions

View file

@ -2037,7 +2037,7 @@ t_stat sim_instr(void)
R[NUM_PC] = cpu_effective_address(dst);
continue;
case LLSW3:
result = cpu_read_op(src2) << (cpu_read_op(src1) & 0x1f);
result = (t_uint64)cpu_read_op(src2) << (cpu_read_op(src1) & 0x1f);
cpu_write_op(dst, (uint32)(result & WORD_MASK));
cpu_set_nz_flags((uint32)(result & WORD_MASK), dst);
break;

View file

@ -518,7 +518,7 @@ void iu_write(uint32 pa, uint32 val, size_t size)
if ((iu_port_a.stat & STS_FFL) == 0) {
iu_port_a.rxbuf[iu_port_a.w_p] = (uint8) val;
iu_port_a.w_p = (iu_port_a.w_p + 1) % IU_BUF_SIZE;
if (iu_port_a.w_p == iu_port_b.r_p) {
if (iu_port_a.w_p == iu_port_a.r_p) {
sim_debug(WRITE_MSG, &tto_a_dev,
">>> FIFO FULL ON LOOPBACK THRA! <<<");
iu_port_a.stat |= STS_FFL;

View file

@ -788,12 +788,18 @@ void tod_update_delta()
switch(td->year) {
case 1: /* Leap Year - 3 */
tm.tm_year = 85;
break;
case 2: /* Leap Year - 2 */
tm.tm_year = 86;
break;
case 4: /* Leap Year - 1 */
tm.tm_year = 87;
break;
case 8: /* Leap Year */
tm.tm_year = 88;
break;
default:
break;
}
tm.tm_isdst = 0;
ssec = mktime(&tm);
@ -889,6 +895,7 @@ void tod_write(uint32 pa, uint32 val, size_t size)
break;
case 0x34: /* Year */
td->year = (uint8) val;
break;
case 0x38:
if (val & 1) {
tod_update_delta();