DISK, TAPE: Remove compiler and Coverity warnings
This commit is contained in:
parent
6df860ea1a
commit
519ef27def
2 changed files with 4 additions and 2 deletions
|
@ -1123,7 +1123,7 @@ t_seccnt sects_read;
|
||||||
if ((dptr = find_dev_from_unit (uptr)) == NULL)
|
if ((dptr = find_dev_from_unit (uptr)) == NULL)
|
||||||
return ret_val;
|
return ret_val;
|
||||||
saved_capac = uptr->capac;
|
saved_capac = uptr->capac;
|
||||||
uptr->capac = temp_capac;
|
uptr->capac = (t_addr)temp_capac;
|
||||||
if ((sim_disk_rdsect (uptr, 512 / ctx->sector_size, (uint8 *)&Home, §s_read, sizeof (Home) / ctx->sector_size)) ||
|
if ((sim_disk_rdsect (uptr, 512 / ctx->sector_size, (uint8 *)&Home, §s_read, sizeof (Home) / ctx->sector_size)) ||
|
||||||
(sects_read != (sizeof (Home) / ctx->sector_size)))
|
(sects_read != (sizeof (Home) / ctx->sector_size)))
|
||||||
goto Return_Cleanup;
|
goto Return_Cleanup;
|
||||||
|
|
|
@ -3274,9 +3274,11 @@ tape_size = (t_addr)sim_fsize (uptr->fileref);
|
||||||
sim_debug_unit (MTSE_DBG_STR, uptr, "tpc_map: tape_size: %" T_ADDR_FMT "u\n", tape_size);
|
sim_debug_unit (MTSE_DBG_STR, uptr, "tpc_map: tape_size: %" T_ADDR_FMT "u\n", tape_size);
|
||||||
for (objc = 0, sizec = 0, tpos = 0;; ) {
|
for (objc = 0, sizec = 0, tpos = 0;; ) {
|
||||||
(void)sim_tape_seek (uptr, tpos);
|
(void)sim_tape_seek (uptr, tpos);
|
||||||
i = sim_fread (&bc, sizeof (t_tpclnt), 1, uptr->fileref);
|
i = sim_fread (&bc, sizeof (bc), 1, uptr->fileref);
|
||||||
if (i == 0) /* past or at eof? */
|
if (i == 0) /* past or at eof? */
|
||||||
break;
|
break;
|
||||||
|
if (bc > 65535) /* Range check length value to satisfy Coverity */
|
||||||
|
break;
|
||||||
if (countmap[bc] == 0)
|
if (countmap[bc] == 0)
|
||||||
sizec++;
|
sizec++;
|
||||||
++countmap[bc];
|
++countmap[bc];
|
||||||
|
|
Loading…
Add table
Reference in a new issue